GetCell()

IExcelDataWorkbook::GetCell(int32_t, int32_t, int32_t) method

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

virtual System::SharedPtr<IExcelDataCell> Aspose::Slides::Excel::IExcelDataWorkbook::GetCell(int32_t worksheetIndex, int32_t row, int32_t column)=0

Arguments

ParameterTypeDescription
worksheetIndexint32_tZero-based index of the worksheet.
rowint32_tZero-based row index of the cell.
columnint32_tZero-based column index of the cell.

Return Value

The cell at the specified location.

Remarks

Example:

System::SharedPtr<ExcelDataWorkbook> wb = System::MakeObject<ExcelDataWorkbook>(testFile);
System::SharedPtr<IExcelDataCell> cell = wb->GetCell(1, 1, 1);
System::Console::WriteLine(System::ObjectExt::ToString(cell->get_Value()));

IExcelDataWorkbook::GetCell(System::String, int32_t, int32_t) method

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

virtual System::SharedPtr<IExcelDataCell> Aspose::Slides::Excel::IExcelDataWorkbook::GetCell(System::String worksheetName, int32_t row, int32_t column)=0

Arguments

ParameterTypeDescription
worksheetNameSystem::StringThe name of the worksheet.
rowint32_tZero-based row index of the cell.
columnint32_tZero-based column index of the cell.

Return Value

The cell at the specified location.

Remarks

Example:

System::SharedPtr<ExcelDataWorkbook> wb = System::MakeObject<ExcelDataWorkbook>(testFile);
System::SharedPtr<IExcelDataCell> cell = wb->GetCell(u"Sheet1", 1, 1);
System::Console::WriteLine(System::ObjectExt::ToString(cell->get_Value()));

IExcelDataWorkbook::GetCell(int32_t, System::String) method

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

virtual System::SharedPtr<IExcelDataCell> Aspose::Slides::Excel::IExcelDataWorkbook::GetCell(int32_t worksheetIndex, System::String cellName)=0

Arguments

ParameterTypeDescription
worksheetIndexint32_tZero-based index of the worksheet.
cellNameSystem::StringThe Excel-style cell reference (e.g., "A1", "C5").

Return Value

The cell at the specified location.

Remarks

Example:

System::SharedPtr<ExcelDataWorkbook> wb = System::MakeObject<ExcelDataWorkbook>(testFile);
System::SharedPtr<IExcelDataCell> cell = wb->GetCell(1, u"B2");
System::Console::WriteLine(System::ObjectExt::ToString(cell->get_Value()));

IExcelDataWorkbook::GetCell(System::String, System::String) method

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

virtual System::SharedPtr<IExcelDataCell> Aspose::Slides::Excel::IExcelDataWorkbook::GetCell(System::String worksheetName, System::String cellName)=0

Arguments

ParameterTypeDescription
worksheetNameSystem::StringThe name of the worksheet.
cellNameSystem::StringThe Excel-style cell reference (e.g., "A1", "C5").

Return Value

The cell at the specified location.

Remarks

Example:

System::SharedPtr<ExcelDataWorkbook> wb = System::MakeObject<ExcelDataWorkbook>(testFile);
System::SharedPtr<IExcelDataCell> cell = wb->GetCell(u"Sheet1", u"B2");
System::Console::WriteLine(System::ObjectExt::ToString(cell->get_Value()));

See Also