1
I have an Excel sheet with the following columns
- Product ID
- Product Name
- Images
Images are placed on the worksheet but not in any cell. I want to extract the images as files (jpg, png, gif, etc) and I also want them to be named according to values in the "Product Name" column.
So the 1st image will be named according to the 1st value in "Product Name" Column, the second according to the second etc.
As a workaround, I'm able solve the extracting part by saving the Excel sheet as a HTML document, which also saves the images I want. However I'm unable to control the image names: Excel sets a pre-defined name, like image1.jpg, image2.jpg etc.
So, what I want is
if the "product name" column has the following values ;
- product1
- product2
- product3
I should have images with the name
- product1.jpg
- product2.jpg
- product3.jpg
1I'm afraid this is not clear enough. Excel cells can contain values or formulas. They cannot contain images. You can insert images into a worksheet, but they are managed on a separate layer, not "in" a cell. An image object can be positioned relative to a cell. You may want to provide a sample file and detail your requirements some more. – teylyn – 2013-05-31T11:47:28.497
1I agree with @teylyn because Excel is not good for managing images. If you are creating this spreadsheet you may want to consider using links to the images or use a different application. If you just trying to extract the data out of it, that is different. Please clarify. – CharlieRB – 2013-05-31T11:50:59.927
You can do this with VBA
selection.shaperange.name
will assign a name based upon a cell. However, your worksheet will need to be organized in such a manner that it can associate the correct image with the appropriate cell for a label. – dav – 2013-05-31T18:40:05.543I have edited the Question accordingly, basically I only want to extract the images as files and at the same time I also want to control the file names according to the values in "Product Name" Column. – TDsouza – 2013-06-01T05:51:51.313