Add, Extract & Remove Worksheet Images

Add Images Example

To insert an image into a worksheet, use the InsertImage method. It supports various image types including JPG/JPEG, BMP, PNG, GIF, and TIFF. You specify the top-left and bottom-right corners of the image within the worksheet to determine its dimensions. The width and height are calculated by subtracting the start and end column and row indices.

Extract Images Example

To extract images from the selected worksheet, access the Images property, which returns a list of all images contained within the sheet. From this list you can perform operations such as exporting, resizing, retrieving position data, and obtaining the raw byte data of each image. Note that image IDs follow an odd-numbered pattern, incrementing in the sequence 1, 3, 5, 7, and so on.

Remove Images Example

Following the extract images example, any inserted image can be removed using its corresponding ID number. Pass the image's ID to the RemoveImage method to delete it from the worksheet.

Explore How to Manipulate Excel Images with IronXL for Python

Ready to Get Started?
Version: 2026.4 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast?
run a sample watch your data become a spreadsheet.