Hi,
I would like to know how I can I use XLSReadWriteII 4 to get a picture from an excel file if I already know the position of the picture.
For example, If I know there is a picture in the cell A1, how can I get that picture and save it to disk ?
get picture if I know its position in excel file ?
Re: get picture if I know its position in excel file ?
Hello
A picture has column and row properties the defines it's position, so you can check if a it's in a cell.
A picture has column and row properties the defines it's position, so you can check if a it's in a cell.
Lars Arvidsson, Axolot Data
Re: get picture if I know its position in excel file ?
hello larsa,
The position of pictures is described in the property XLS.Sheet[0].DrawingObjects.Pictures
But if I want to save a picture to a stream (or a file on hard disk), I have to use the property XLS.MSOPictures.
But there is no connection between these 2 properties, so I don't know which picture in XLS.MSOPictures is corresponding to which in XLS.Sheet[?].DrawingObjects.Pictures ?
The position of pictures is described in the property XLS.Sheet[0].DrawingObjects.Pictures
But if I want to save a picture to a stream (or a file on hard disk), I have to use the property XLS.MSOPictures.
But there is no connection between these 2 properties, so I don't know which picture in XLS.MSOPictures is corresponding to which in XLS.Sheet[?].DrawingObjects.Pictures ?
Re: get picture if I know its position in excel file ?
Hello
Yes, there is a connection between the two objects. Please study the WritePictures sample.
Yes, there is a connection between the two objects. Please study the WritePictures sample.
Lars Arvidsson, Axolot Data
Re: get picture if I know its position in excel file ?
Could you please explain more ? Actually, before I posted this question, I have studied the WritePicture and ReadPicture samples.
In the WritePicture Sample, this is a very special case that you have just add a picture to MSOPictures so you can easily determine it as the last object in MSOPictures collection. This example also show that there is a connection between MSOPictures and DrawingObject.Pictures is the filename and the PictureName.
But in the ReadPictures sample, we can see that not every pictures has the filename property, maybe just an empty string!!!
In the WritePicture Sample, this is a very special case that you have just add a picture to MSOPictures so you can easily determine it as the last object in MSOPictures collection. This example also show that there is a connection between MSOPictures and DrawingObject.Pictures is the filename and the PictureName.
But in the ReadPictures sample, we can see that not every pictures has the filename property, maybe just an empty string!!!