Articles in this section
Category / Section

How to Clear the Spreadsheet data in Silverlight SpreadsheetControl?

1 min read

Spreadsheet control allows you to clear the worksheet by using two ways:

  • ClearData()
  • Clear()

ClearData():

This function clears only the content in each cell of the worksheet. You can use the following code example for reference.

C#

this.spreadSheetControl.ExcelProperties.WorkBook.ActiveSheet.ClearData();
this.spreadSheetControl.GridProperties.ActiveSpreadsheetGrid.InvalidateCells();

 

Clear():

This function entirely (i.e. content, formatting, merged cells) clears the worksheet.

C#

this.spreadSheetControl.ExcelProperties.WorkBook.ActiveSheet.Clear();
this.spreadSheetControl.GridProperties.ActiveSpreadsheetGrid.InvalidateCells();

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied