Conversion between cell name and row/column index

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 for Node.js via C++ provides the CellsHelper.cellIndexToName method, which allows developers to get a cell’s name if they provide the row and column indices.

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

Get Row and Column Indices from Cell Name

It is possible to find the row and column indices of a cell from its name. This article explains how.
Aspose.Cells for Node.js via C++ provides the CellsHelper.cellNameToIndex method, which allows developers to get the row and column indices from the cell’s name.

The following sample code illustrates how to use CellsHelper.cellNameToIndex to retrieve the row and column indices from the cell’s name. The code generates the following output.

Create Safe Sheet Names

Sometimes there is a need to assign the sheet name at runtime. In this scenario, sheet names may contain characters such as <>+?\". These characters are not allowed in a sheet name and must be replaced with a preset character provided by the user. Additionally, the name may exceed the maximum length of 31 characters and needs to be truncated. Apache POI provides features for creating safe names; similarly, Aspose.Cells for Node.js via C++ offers this functionality to handle all these issues. The following sample code demonstrates this feature:

Output:

this is first name which is cre

 <> + (adj.Private _ " Private"