Method For
- Namespace
- DocWright.Spreadsheet
- Assembly
- DocWright.Spreadsheet.dll
For(string)
Returns the rule that covers a cell: the first the file lists, as Excel takes it.
public XlsxDataValidation? For(string reference)
Parameters
referencestringThe cell, such as
B2.
Returns
- XlsxDataValidation
The rule, or null when no rule covers the cell.
Exceptions
- ArgumentException
The reference is not a cell.
- InvalidOperationException
The sheet is not a worksheet.
- InvalidDocumentException
A part of the workbook is malformed.
For(int, int)
Returns the rule that covers a cell: the first the file lists, as Excel takes it.
public XlsxDataValidation? For(int row, int column)
Parameters
Returns
- XlsxDataValidation
The rule, or null when no rule covers the cell.
Exceptions
- ArgumentOutOfRangeException
The cell is outside the grid.
- InvalidOperationException
The sheet is not a worksheet.
- InvalidDocumentException
A part of the workbook is malformed.