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. Image for the cookie policy date

How to remove image in SpreadSheet

Hi,
     I managed to add images in SfSpreadSheet Control using The AddImage method. It worked fine but I couldn't remove the image I inserted.
Could you tell me how to remove an image in the SpreadSheet?

Many Thanks.

Yi

5 Replies

MG Mohanraj Gunasekaran Syncfusion Team October 11, 2019 12:19 PM UTC

Hi ZhouYi, 
 
Thanks for using Syncfusion product. 
 
Sfspreadsheet does not have the support to delete the image programmatically.  But, you can delete that image in UI by select that image and press the delete key. 
 
Currently, we are analyzing the possibility to provide programmatical support to delete the image in our source. So, we will check and update the details on  October 15, 2019. 
 
Thanks for your patience until then. 
 
Regards, 
Mohanraj G 



ZH ZhouYi November 13, 2019 02:43 AM UTC

Hi Mohanraj G,

Thanks for your reply. I think I could find another way to achieve the expected effect.

Regards, 
Yi


AR Arulpriya Ramalingam Syncfusion Team November 13, 2019 01:55 PM UTC

Hi ZhouYi, 
 
Thank you for the update. 
 
Spreadsheet images can be removed by removing that particular picture using the Remove() method and please refer to the below to remove the pictures. Moreover, we are glad that the reported scenario has been resolved at your end. 
 
Code example 
 
void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args) 
{ 
    if (Spreadsheet.ActiveSheet.Pictures.Count > 0) 
        Spreadsheet.ActiveSheet.Pictures[0].Remove(); 
} 
 
If you have any other queries, please get back to us. 
 
Regards, 
Arulpriya 



YZ yi zhou replied to Arulpriya Ramalingam April 2, 2020 09:11 AM UTC

Hi ZhouYi, 
 
Thank you for the update. 
 
Spreadsheet images can be removed by removing that particular picture using the Remove() method and please refer to the below to remove the pictures. Moreover, we are glad that the reported scenario has been resolved at your end. 
 
Code example 
 
void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args) 
{ 
    if (Spreadsheet.ActiveSheet.Pictures.Count > 0) 
        Spreadsheet.ActiveSheet.Pictures[0].Remove(); 
} 
 
If you have any other queries, please get back to us. 
 
Regards, 
Arulpriya 


Hi Ramalingam
     It works fine for me. Thank you!

Yi!


AR Arulpriya Ramalingam Syncfusion Team April 3, 2020 12:22 PM UTC

Hi ZhouYi, 
 
Thank you for the update. 
 
We are glad that the reported scenario have been resolved from your end by using the provided solution. Please get back to us, if you need any further assistance. 
 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon