Obtain Excel Column String

If I have a cell position such as .Cells[0,0] what method can I utilize in the ASPOSE.Cells API to obtain the Excel Column representation of “A1”?

Isn’t there a method somewhere that provides the Excel alphabetical column name of a given column index (i.e. Column 7 = “H”) etc.?

Hi,

You may use CellsHelper class’s static methods for your need. See the code segments below:

1)
//Get cell name from cell index and column indexes (zero-based)
Cells cells = sheet.Cells;
Cell cell = cells[0,0];
string cellname = CellsHelper.CellIndexToName(cell.Row, cell.Column);


2)
//Get column name from index (zero based).
string colname = CellsHelper.ColumnIndexToName(index)


Thank you.