Test in production without watermarks.
Works wherever you need it to.
Get 30 days of fully functional product.
Have it up and running in minutes.
Full access to our support engineering team during your product trial
In this tutorial, we delve into the process of handling images within Excel spreadsheets using the IronXL library in C#. The session begins with the installation of the IronXL library via the NuGet package manager. First, we import the necessary namespaces for drawing and IronXL functionalities. A new Excel workbook is created, and its default worksheet is selected. The 'insert image' method is employed, which requires the image file path and its dimensions, defined by the top left and bottom right corners of the spreadsheet. We then retrieve a list of images in the worksheet using the 'images' property, looping through each image to convert it into a bitmap object for saving. Additionally, the tutorial demonstrates how to remove images using the 'remove image' method by specifying the image ID. Finally, all changes are saved into a new Excel file, named 'insert images.xlsx'. Upon running the project, the Excel file successfully displays the added images, appropriately sized and positioned. The tutorial concludes with a brief on checking the extracted photos saved as individual PNG files with unique IDs. Viewers are encouraged to engage with the content by liking, subscribing, and trying out the software through a trial subscription.
Further Reading: How to Add, Extract, and Remove Images from Worksheets