Page 1 of 1

Problem with images and acces violation error

Posted: Sun Feb 09, 2014 7:01 pm
by maz65
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 :

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;
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

Re: Problem with images and acces violation error

Posted: Mon Feb 10, 2014 4:46 pm
by larsa
Hello

Please try the latest update.

Re: Problem with images and acces violation error

Posted: Mon Feb 10, 2014 8:08 pm
by maz65
Hello Lars,
now it works perfectly with jpg over muliple sheets, thanks !
(I have not tested with bmp files)
Now I have another question, related to migration, but I will start a new topic.

thanks,
Massimo