I have an Excel sheet with two column, one is a number , and second column have a picture. i want to read these data from c# with oledb connection, i can read number easily , but pictures is not contained in second column , so in c# i just get first column.
now, how can i read the images ? i want to extract the numbers and related images from this excel sheet.
Nick's answer work great for me in my web application with a little change it was not copying image to clipboard
Works for me
This is an older topic but I figured I would add some of my code thus far.
This example assumes you have a Windows application that you've placed a Picturebox on called "pictureBox1".
It also assumes you add a reference to Excel (Microsoft.Office.Interop.Excel).
Pictures are bound to your workbook and not part of the cells themself as Jay has mentioned. You CAN find where the image should go pretty easily by using the TopLeftCell and BottomRightCell.
Now, you'll need to write a loop to pull all of the images our of the document but I'll leave that to you.
Not possible, I'm afraid.
Pictures do not live in cells -- you can place them over the cell, and you can size them to look like they are in the cell, but they in no way occupy that cell.
You can manipulate image contents of a worksheet using VBA and COM interop, but not OLEDB.