Issue with named ranges

Hello,

I’ve encountered an issue with using multiple named ranges with the same name, but different scope in the same worksheet. I’ve attached an xlsx file which can be used to reproduce the issue. The workbook contains two named ranges called “name”, the first of which has sheet level scope, and the other workbook level scope. In cell A2, the workbook scoped range is used, but the getFormula() and getR1C1Formula() both return only “=name”, which would indicate worksheet level scope and not workbook level scope. Excel displays the formula as: =test.xlsx!name.

Thanks,
Sean

Hi,

Thanks for your posting and using Aspose.Cells for Java.

We were able to replicate this issue with the latest version: Aspose.Cells
for Java v7.3.3.2
.


We have logged this issue in our database. We will look into this issue and fix it.

Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40364.

Please check the test code below and the console output. I have also attached the screenshot explaining the issue for the reference.

Java


String filePath = “F:\Shak-Data-RW\Downloads\test.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);


Cell a1 = worksheet.getCells().get(“A1”);

Cell a2 = worksheet.getCells().get(“A1”);


System.out.println(a1.getFormula());

System.out.println(a2.getFormula());


Console Output:
=name
=name

Screenshot:

Hi,

We have fixed this issue.

Please download and try this fix: Aspose.Cells for Java v7.3.3.3 and let us know your feedback.

Hello,

It appears that this issue has been resolved for Cell.getFormula() (I am seeing =!name now), but not for Cell.getR1C1Formula() (I am still seeing only =name).

Thank,
Sean

Hi,


You are right as I tested using the following code, cell.getR1C1Formula() still shows only name without worksheet reference. We have reopened your issue again and will figure it out soon for cell.getR1C1Formula() method.

Sample code:

String filePath = “test.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);


Cell a1 = worksheet.getCells().get(“A1”);

Cell a2 = worksheet.getCells().get(“A2”);


System.out.println(a1.getFormula());

System.out.println(a2.getFormula());


System.out.println(a1.getR1C1Formula());

System.out.println(a2.getR1C1Formula());

Output:

=name
=test_issuew.xlsx!name
=name
=name


Thank you.

Hi,

Thanks for using Aspose.Cells.

We have fixed the issue of RC formula for the Name.

Please download and try this fix: Aspose.Cells for Java v7.3.3.4 and let us know your feedback.

Hello,

The problem seems to be resolved. Thanks for your help!

Thanks,
Sean

Hi,

Thanks for your feedback.

It’s good to know your issue is resolved now. Let us know if you face any other issue.

We will be glad to help you asap.

The issues you have found earlier (filed as CELLSJAVA-40364;CELLSJAVA-40364) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.