Exporting TSheet Pictures

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
billegge
Posts: 23
Joined: Fri Feb 08, 2008 8:34 pm

Exporting TSheet Pictures

Post by billegge »

I am building an Excel to PDF converter for use in my company and I have an excel file with a company logo in it. I need to export this picture to a file so I can then embed it into the pdf.

My problem is that I cannot associate the Picture in the sheet with a picture in MSOPictures. Sheet.DrawingObjects.Pictures.Items[0].PictureName has the name of the file without the extenstion, but MSOPictures.Items[0].Filename is blank. So I don't know how to associate them.
billegge
Posts: 23
Joined: Fri Feb 08, 2008 8:34 pm

Re: Exporting TSheet Pictures

Post by billegge »

After doing some research, it seems that the PictureID of Sheet.DrawingObjects.Pictures.Items[x] relates to the index into MSOPictures as

PicID:= Sheet.DrawingObjects.Pictures.Items[x].PictureID;
MSOPicIndex:= PicID-1;
ThePicture:= XLS.MSOPictures.Items[MSOPicIndex];

Is this correct?
Post Reply