[]
Provides helper functions for converting between cell addresses and row/column indices.
This utility class offers static methods to convert row indices to names, column indices to names, cell indices to addresses, and vice versa. It also supports retrieving the pixel boundary of a given range.
public static class CellInfo
Public Module CellInfo
// Convert cell index (row=2, column=1) to name -> "B3"
string cellName = CellInfo.CellIndexToName(2, 1);
// Convert cell name to index -> [2, 1]
int row = -1;
int column = -1;
CellInfo.CellNameToIndex("B3", out row, out column);
// Convert column index to name -> "D"
string colName = CellInfo.ColumnIndexToName(3);
// Convert row index to name -> "5"
string rowName = CellInfo.RowIndexToName(4);
| Name | Description |
|---|---|
| CellIndexToName(int, int) | Gets the cell name (address) according to its row and column indexes. |
| CellNameToIndex(string, out int, out int) | Gets the cell row and column according to its name (address). |
| ColumnIndexToName(int) | Gets the column name according to the column index. |
| ColumnNameToIndex(string) | Gets the column index according to the column name. |
| GetAccurateRangeBoundary(IRange) | Gets the accurate position and size, in pixels, of the specified range. |
| GetRangeBoundary(IRange) | Gets the position and size, in pixels, of the specified range. |
| RowIndexToName(int) | Gets the row name according to the row index. |
| RowNameToIndex(string) | Gets the row index according to the row name. |