Method GetCell
GetCell(int, int)
Gets one cell.
public XlsxDocumentCell GetCell(int row, int column)
Parameters
Returns
- XlsxDocumentCell
The cell; a blank one when the sheet stores nothing there.
Remarks
The first call reads the sheet through once and keeps an index with one entry for each cell the sheet stores, so its memory is proportional to the sheet's own size; later calls are lookups. To read a whole sheet once, Cells holds nothing.
Exceptions
- ArgumentOutOfRangeException
The row or the column is outside the worksheet grid.
- InvalidDocumentException
The sheet's part is malformed.
GetCell(string)
Gets one cell by its reference.
public XlsxDocumentCell GetCell(string reference)
Parameters
referencestringThe reference, such as
B4.
Returns
- XlsxDocumentCell
The cell; a blank one when the sheet stores nothing there.
Exceptions
- ArgumentNullException
referenceis null.- ArgumentException
referenceis not a cell reference inside the worksheet grid.- InvalidDocumentException
The sheet's part is malformed.