Get Cells Index
Contents
[
Hide
]
The default view of Excel is A1 style reference,each column is defined as A, B, C…. , and the cells are named as A1, B2, C3… and so on.
You may want to know which row and column is this cell in.
Possible Usage Scenarios
When you only need to manipulate a specific data on the worksheet by row and column index, you need to know the column and column indexes of that specific cell. Aspose.Cells for Python via .NET offers this feature to get row and column index by the name of the row, column and cell. Aspose.Cells for Python via .NET provides the following properties and methods to help you achieve your goals.
- CellsHelper.cell_name_to_index
- CellsHelper.column_index_to_name
- CellsHelper.column_name_to_index
- CellsHelper.row_index_to_name
- CellsHelper.row_name_to_index
Note: The indexing is zero-based in Aspose.Cells for Python via .NET, but the id of Row is one-based in MS Excel.
Get Cells Indexes using Aspose.Cells for Python Excel Library
This example shows how to:
- Create a workbook and add some data.
- Find the specific cell in the first worksheet.
- Get Row index and Column index by the name of the cell.
- Get Column index by the name of the column.
- Get Row index by the name of the row.