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 Python via .NET provides the CellsHelper.cell_index_to_name 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.cell_index_to_name to access 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 a row and column index of the cell from its name. This article explains how. Aspose.Cells for Python via .NET provides the CellsHelper.cell_name_to_index 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.cell_name_to_index to get the row and column index from the cell’s name. The code generates the following output.

Create safe sheet names

Sometimes there is a need of assigning the sheet name at runtime. In this scenario, there may be sheet names which may contain some additional characters like <>+(?”. There is a need to replace any such character, which is not allowed as a sheet name with some preset character provided by user. Similarly the length may increase to more than 31 characters which needs to be truncated. Apache POI provides certain features of creating safe names, hence similar feature is provided by Aspose.Cells for Python via .NET to handle all these issues. Following sample code demonstrates this feature:

Output:

this is first name which is cre

 <> + (adj.Private _ " Private"