Table of Contents

Method Remove

Namespace
DocWright.Spreadsheet
Assembly
DocWright.Spreadsheet.dll

Remove(XlsxCellRange)

Removes the validation of a range, as Excel's Clear All in Data Validation does: every rule gives up the cells in the range, and a rule left with none goes. The cells keep their values.

public int Remove(XlsxCellRange range)

Parameters

range XlsxCellRange

The range.

Returns

int

How many rules gave up cells (those removed included).

Exceptions

InvalidOperationException

The sheet is not a worksheet.

InvalidDocumentException

A part of the workbook is malformed.

Remove(XlsxDataValidation)

Removes one rule, with all its cells.

public bool Remove(XlsxDataValidation validation)

Parameters

validation XlsxDataValidation

The rule, as read from this list.

Returns

bool

Whether the sheet still had the rule.

Exceptions

ArgumentNullException

validation is null.

InvalidOperationException

The sheet is not a worksheet.

InvalidDocumentException

A part of the workbook is malformed.