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 for your posting and using Aspose.Cells for Java.
We were able to replicate this issue with the latest version: Aspose.Cells
for Java v188.8.131.52.
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.
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”);
We have fixed this issue.
Please download and try this fix: Aspose.Cells for Java v184.108.40.206 and let us know your feedback.
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).
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 v220.127.116.11 and let us know your feedback.
The problem seems to be resolved. Thanks for your help!
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.