GetCell

GetCell(int, int, int)

Retrieves a cell from the specified worksheet using its index and cell coordinates.

public IExcelDataCell GetCell(int worksheetIndex, int row, int column)
ParameterTypeDescription
worksheetIndexInt32Zero-based index of the worksheet.
rowInt32Zero-based row index of the cell.
columnInt32Zero-based column index of the cell.

Return Value

The cell at the specified location.

Examples

Example:

[C#]
ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile);
IExcelDataCell cell = wb.GetCell(1, 1, 1);
Console.WriteLine(cell.Value.ToString());

See Also


GetCell(string, int, int)

Retrieves a cell from the specified worksheet using its name and cell coordinates.

public IExcelDataCell GetCell(string worksheetName, int row, int column)
ParameterTypeDescription
worksheetNameStringThe name of the worksheet.
rowInt32Zero-based row index of the cell.
columnInt32Zero-based column index of the cell.

Return Value

The cell at the specified location.

Examples

Example:

[C#]
ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile);
IExcelDataCell cell = wb.GetCell("Sheet1", 1, 1);
Console.WriteLine(cell.Value.ToString());

See Also


GetCell(int, string)

Retrieves a cell from the specified worksheet using its index and Excel-style cell name (e.g., “B2”).

public IExcelDataCell GetCell(int worksheetIndex, string cellName)
ParameterTypeDescription
worksheetIndexInt32Zero-based index of the worksheet.
cellNameStringThe Excel-style cell reference (e.g., “A1”, “C5”).

Return Value

The cell at the specified location.

Examples

Example:

[C#]
ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile);
IExcelDataCell cell = wb.GetCell(1, "B2");
Console.WriteLine(cell.Value.ToString());

See Also


GetCell(string, string)

Retrieves a cell from the specified worksheet using Excel-style cell name (e.g., “B2”).

public IExcelDataCell GetCell(string worksheetName, string cellName)
ParameterTypeDescription
worksheetNameStringThe name of the worksheet.
cellNameStringThe Excel-style cell reference (e.g., “A1”, “C5”).

Return Value

The cell at the specified location.

Examples

Example:

[C#]
ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile);
IExcelDataCell cell = wb.GetCell("Sheet1", "B2");
Console.WriteLine(cell.Value.ToString());

See Also