Table of Contents

Method Remove

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

Remove(int, int)

Takes a cell out of the sheet altogether: value, formula and format. Nothing moves; the cells around it stay where they are.

public void Remove(int row, int column)

Parameters

row int

The one-based row.

column int

The one-based column.

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.

Remove(string)

Takes a cell out of the sheet by its reference. See Remove(int, int).

public void Remove(string reference)

Parameters

reference string

The reference, such as B4.

Exceptions

ArgumentNullException

reference is null.

ArgumentException

reference is 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.