Save every picture in an Excel workbook, named by its cell — Step-by-step guide
Excel exports pictures as image1.png and image2.png, with no link to the row they belong to. XlsxPics reads the .xlsx in your browser and saves each picture as Products_B4.png, named by its sheet and cell, or by the text in a column you choose, such as the product name. You also get index.csv with the mapping. Nothing is uploaded.
What the sample produces
The sample is a workbook written by a script, with two sheets, floating pictures and one picture placed in a cell. The check compares each saved file with the bytes of the picture the script wrote, and checks every row of index.csv. A second workbook, with a sheet name that holds an ampersand, duplicate names and a row with no name, checked the naming rules.
- Pictures saved
- 4
- Named by sheet and cell
- Products_B2.png, Products_B3.png, Products_C4.png, Extra_D3.png
- Named by column A
- Red mug.png, Blue bowl.png, Green jar.png, Lamp.png
- Mapping
- index.csv: sheet, cell, placed, file, text, media path
How to use it
- Save a copy of the workbook as .xlsx with the pictures still in it. Do not export it to CSV first, because the pictures are lost.
- Choose the .xlsx file. Optionally type the column letter that holds the names, such as A. The preview counts the pictures, where each one sits and how many have no name in that column.
- Download the ZIP. It holds the pictures and index.csv, which lists the sheet, the cell, the file name and the text in the chosen column for each picture.
Supported files
Reads .xlsx workbooks with pictures that float over the cells, and pictures placed in a cell (Place in Cell, stored in xl/metadata.xml and xl/richData). Each picture is saved as it is stored in the workbook (PNG, JPEG, GIF, EMF and the other formats it holds), without re-encoding. The name is the sheet and the top-left cell of the picture, such as Products_B4.png, or the text of the chosen column in the same row; if that cell is empty the sheet and cell are used, and repeated names get (2), (3). A picture group is saved at the cell where the group starts. A picture anchored to an absolute point with no cell is skipped and reported. Charts and shapes without a picture are not saved. Old .xls files are not supported. Only the pictures are saved, not the cell values. The sample is generated by a script, and the Place in Cell reading follows the layout that Excel writes but was not tested with a file saved by Excel, so try one of your own workbooks with Place in Cell before you rely on it. Up to 200 MB and 5,000 pictures, read in browser memory.