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();
wb.Open("Book1.xls");
Worksheet ws = wb.Worksheets[0];

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

Is this supported?

Hi,

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

Workbook wb = new Workbook();
wb.Open(“Book1.xls”);
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:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/named-ranges.html


Thank you.