here is my simple code: drop an xlsreadwrite component into an empty form, try to create an excel file from scratch with an image inside it, version is 2007 and xlsreadwrite 5 version is 5.20.14 :
Code: Select all
procedure TSDIAppForm.Button1Click(Sender: TObject);
begin
XLS.Clear;
XLS.FileName := 'c:\test.xlsx';
XLS[0].Drawing.InsertImage('c:\myimage.jpg',0,1,0,0,1);
XLS.Write;
end;
Note that if the image is a .bmp file , an access violation error occurs in InsertImage method.
Let me now, am I doing something wrong? Do you have an immediate workaround ?
Thanks & Regards
-Massimo