Page 1 of 1

Load image from Stream and insert to XLS

Posted: Sun Dec 04, 2016 3:38 pm
by MaxChan
Dear Support,

I am able to load the image and insert into XLS SHEET.
var Image: TXLSDrawingImage;
Image := XSS.XLS[0].Drawing.InsertImage( 'resource\psd-icon.png' ,1,1,0,0,1.25);

But I tried to use TMemoryStream it have error.

Do you have an example that load from stream?

thank you very much!

Re: Load image from Stream and insert to XLS

Posted: Mon Dec 05, 2016 7:59 am
by larsa
Hello

You are trying to read a file from "resource\psd-icon.png" as the stream is missing in the call to InsertImage.
Use:

Code: Select all

Image := XSS.XLS[0].Drawing.InsertImage( 'resource\psd-icon.png' ,MyMemoryStream,1,1,0,0,1.25);