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.
Loading
Diviner ChanPosted Aug 27, 2008, 6:10 AM
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.
Muhammad Shahid FarooqPosted Aug 12, 2008, 4:13 PM
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);