Click or drag to resize

IXLSRange ClearContents Method

Clear the contents of the Range.
Examples
The following code illustrates how to clear the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Clears the Range C2</para><para>worksheet.Range["C2"].ClearContents();</para><para>//Save to file</para><para>workbook.SaveToFile("ClearContents.xlsx");</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
void ClearContents()
See Also