Method Clear
Clear(int, int)
Empties a cell: its value and its formula go, and the cell stays for its format.
public void Clear(int row, int column)
Parameters
Exceptions
- ArgumentOutOfRangeException
The row or the column is outside the worksheet grid.
- InvalidOperationException
The sheet is not a worksheet.
- UnsupportedFeatureException
The cell is part of an array formula entered over several cells, or is a header or totals cell of a table.
- InvalidDocumentException
The sheet's part is malformed.
Clear(string)
Empties a cell by its reference. See Clear(int, int).
public void Clear(string reference)
Parameters
referencestringThe reference, such as
B4.
Exceptions
- ArgumentNullException
referenceis null.- ArgumentException
referenceis not a cell reference inside the worksheet grid.- InvalidOperationException
The sheet is not a worksheet.
- UnsupportedFeatureException
The cell is part of an array formula entered over several cells, or is a header or totals cell of a table.
- InvalidDocumentException
The sheet's part is malformed.