Hi all,
I have an Excel file. The file contains several pictures in cells
respectively. Each picture's property in cell is set to "Move and size
with cells" to fit itself in individual cell range.
Now I want to write a method to read it to my C# application, how to do this?
I have search a day from Google but I just find too many article about
write picture to Excel but lack of read picture. Hope someone can help
me here.
Thank you very much.
--
Best regards,
Diviner.
How to read picture from Excel?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Muhammad Shahid Farooq107 reputationPosted Aug 12, 2008, 12:13 PM EDT
For opening excel file write the following code:
Stream fileStream = File.OpenRead(file);
Workbook book = new Workbook();
book.Open(fileStream);
Worksheet sheet = book.Worksheets[0];
For reading cell that contains picture write the following code:
int row = 1;
int col = 0;
Picture pic = sheet.ExtractPicture(row, col);
Diviner Chan7 reputationPosted Aug 27, 2008, 2:10 AM EDT
Thank you very much.
But I can't find ExtractPicture method in WorkSheet object. I am using Microsoft.Office.Interop.Excel workspace. Are you talking about this?
--
Best regards,
Diviner.