Table of Contents

Method GetCell

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

GetCell(int, int)

Gets one cell.

public XlsxDocumentCell GetCell(int row, int column)

Parameters

row int

The one-based row, 1 to 1,048,576.

column int

The one-based column, 1 to 16,384.

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

reference string

The reference, such as B4.

Returns

XlsxDocumentCell

The cell; a blank one when the sheet stores nothing there.

Exceptions

ArgumentNullException

reference is null.

ArgumentException

reference is not a cell reference inside the worksheet grid.

InvalidDocumentException

The sheet's part is malformed.