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 clear workbook ?

I have a problem to clear the loaded excel sheet from SfSpreadsheet control to clear again.Please guide me how to achieve it?

Scenario:

(1) Browse a excel file from folder and load that to SfSpreadsheet.
(2) I have a context menu on control to clear the current loaded excel sheet.


3 Replies

KB Kanimozhi Bharathi Syncfusion Team October 28, 2016 10:31 AM UTC

Hi Rajendra, 

We have prepared a sample based on your requirement of browsing the excel file from button click and clearing the data with context menu of SfSpreadsheet. Please find the sample link for your reference. 


If you want to remove the sheet in workbook, please find the below UG link for your reference, 


Regards 
Kanimozhi B 



RA Rajendra October 28, 2016 07:27 PM UTC

Dear Kanimozhi,

I asked to clear the workbook and not the active worksheet. For e.g. when you load the SfSpreadsheet control it shows only Sheet1 with empty worksheet.
 
When you load some excel sheet into it, then it create sheets according to the excel.

Here, my requirement is, I have a context menu for Spreadsheet control for clearing the loaded excel sheet from SfSpreadsheet control and display freshly the Sheet1.


KB Kanimozhi Bharathi Syncfusion Team November 2, 2016 07:00 AM UTC

Hi Rajendra, 

We have prepared a sample based on your requirement by browsing the excel file from button click and clearing the loaded workbook with the Dispose method of SfSpreadsheet. Please find the sample link for your reference. 
 
 
Regards 
Kanimozhi B 


Loader.
Live Chat Icon For mobile
Up arrow icon