Names and Indices

Get Cell Name from Row and Column Indices

It is possible to find a cell’s name given the row and column index. This article explains how. Aspose.Cells provides the CellsHelper::CellIndexToName method which allows developers to get a cell’s name if they provide the row and column index.

The following sample code illustrates how to use CellsHelper::CellIndexToName to access the a cell’s name given a known row and column index. The code generates the following output.

U16String name = CellsHelper::CellIndexToName(3, 5);
std::cout << name.ToUtf8() << std::endl;

Get Row and Column Indices from Cell Name

It is possible to find a row and column index of the cell from its name. This article explains how. Aspose.Cells provides the CellsHelper.CellNameToIndex method which allows developers to get a row and column index from the cell’s name.

The following sample code illustrates how to use CellsHelper::CellNameToIndex to get the row and column index from the cell’s name. The code generates the following output.

int row;
int column;
CellsHelper::CellNameToIndex(u"C4", row, column);
std::cout << "row = " << row << std::endl;
std::cout << "column = " << column << std::endl;