Problem with images and acces violation error
Posted: Sun Feb 09, 2014 7:01 pm
Hi Lars,
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 :
When I open it with Excel 2007 the image is not shown, but an error inside the image borders is telling me about memoy error, or fault image.
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
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