We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CellsHelper.CellNameToIndex doesn't find cell with custom name

I have renamed a cell in Excel from "A1" to "CustomCellName". The following code will not locate the cell.

Workbook wb = new Workbook();
Worksheet ws = wb.Worksheets[0];

int row, column;
CellsHelper.CellNameToIndex("CustomCellName", out row, out column);

Is this supported?


Since you are extracting named range, so, kindly change your code to:

Workbook wb = new Workbook();
Range range = wb.Worksheets.GetRangeByName(“CustomCellName”);
string cellname = range[0,0].Name;
int row, column;
CellsHelper.CellNameToIndex(cellname, out row, out column);

For reference about named ranges, see the document:

Thank you.