We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to replace an existing image in a worksheet using C#,VB.NET?

This article explains how to replace an existing image in a worksheet in XlsIO using C#/VB.NET.

How to replace existing image?

Images are inserted in worksheet using the position in that worksheet. To replace an existing image but within the bounds of the old one, we need to use the size and position of the old image.

To replace the existing image using XlsIO, you need to follow the below steps.

Steps to replace existing image

  1. We need to get the old image size and position information.

 

The following screenshot shows the existing image in a worksheet.

 

 

 

  1. Remove the existing image.

 

  1. Add the new image in the worksheet and set the size and position of the old image.

 

To know more about working with images in XlsIO, please refer the documentation.

Download input files

Download complete sample

The following C#/VB.NET complete code snippet shows the replacement of an existing image in a worksheet.

 

 

The following screenshot shows the output of the image in a worksheet after the existing image is replaced.

 

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8616 03/22/2018 03/22/2018 WinForms XlsIO
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon