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 offers this feature to get row and column index by the name of the row, column and cell. Aspose.Cells provides the following properties and methods to help you achieve your goals.
- CellsHelper.CellNameToIndex
- CellsHelper.ColumnIndexToName
- CellsHelper.ColumnNameToIndex
- CellsHelper.RowIndexToName
- CellsHelper.RowNameToIndex
Note: The indexing is zero-based in Aspose.Cells for .Net, but the id of Row is one-based in MS Excel.
Get Cells Indexes using Aspose.Cells
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.