from ironxl import * # Create a new Excel workbook workbook = WorkBook.Create() worksheet = workbook.DefaultWorkSheet # Insert images worksheet.InsertImage("ironpdf.jpg", 2, 2, 4, 4) worksheet.InsertImage("ironpdfIcon.png", 2, 6, 4, 8) # Retrieve images images = worksheet.Images # Select each image for i, image in enumerate(images): # Save the image any_bitmap = image.ToAnyBitmap() any_bitmap.SaveAs(f"{image.Id}.png") # Remove image worksheet.RemoveImage(3) # Save changes with inserted and removed images workbook.SaveAs("images.xlsx")