Hi,
Hi,
Thanks Amjad for your reply.
Attache the workbook that has only constant named range which does not refer to any cell.
Hi Joe,
Thanks for your posting and using Aspose.Cells.
Please download and use the latest version: Aspose.Cells
for Java v8.2.1.4 it works fine. We tested this issue with the following code and it returned all the named range.
I have also shown you the console output of this code and also attached the source Excel file used in this code for your reference.
Java
String filePath = “F:\Shak-Data-RW\Downloads\myworkbook.xlsx”;
Workbook workbook = new Workbook(filePath);
for (int i = 0; i < workbook.getWorksheets().getNames().getCount(); i++)
{
Name name = workbook.getWorksheets().getNames().get(i);
System.out.println(“Name: " + name.getFullText());
System.out.println(“RefersTo: " + name.getRefersTo());
System.out.println(”-----------------------”);
}
Name: Sheet1!Another
RefersTo: =“t1,t2,t3”
-----------------------
Name: Check
RefersTo: =“Myvalue”
-----------------------
Name: Sheet2!Keee1
RefersTo: =Sheet1!$E$14
-----------------------
Name: testRange
RefersTo: =“”“tiger”“”
-----------------------
Name: Sheet3!UIO
RefersTo: =Sheet1!$E$14
-----------------------
Name: UIOP1
RefersTo: =Sheet1!$E$14
-----------------------
Name: vbn
RefersTo: =Sheet1!$E$14
-----------------------
Thanks ,
Hi Joe,
Thanks for your posting and using Aspose.Cells.
I have tested this code found in the above post with the version 8.1.0.0 and it worked fine and gave the same result as shown in the above post.