From the api, it gives the impression that a named range is a property
of a worksheet. However, from what I can tell of Excel it ought to be a
property of the workbook (e.g. ActiveWorkbook.Names collection in VBA),
although there does seem to be something called “worksheet-specific
name” - which is "all names beginning “Sheet1!” " according to
Can you explain which names we get from the worksheets collection and
how they relate to the names as they might appear within Excel.
Thanks for considering Aspose.
Well, Worksheets.Names property returns named ranges of cells. It actually represents the Names collection so you may get all the named ranges of cells in the worksheets
Following is the sample code, Suppose you have created some named ranges of cells in your spreadsheet template file. The code will return the first named range of cells in the collection and show its text or label in the message box.
Workbook wb = new Workbook();
Worksheets worksheets = wb.Worksheets;
Names names = worksheets.Names;
Name name1 =names;
Aspose Nanjing Team