@pgcentric
You are welcome. If you have any questions, please feel free to contact us at any time.
Please note that we have recently added documents featuring examples with details on the “range” parameter, “if” parameter and using variables in Smart Markers. Please feel free to check these documents, which also include detailed explanation and sample files for your reference.
Hi, we are testing the range parameter in Aspose Smart Markers. We observed that when multiple ranges are placed in the same column, the cell name is being overridden.
Could you please check? The issue can be reproduced in the attached file, sheet “nested”.
range.zip (23.3 KB)
Thank you for sharing the sample files and JSON data.
We apologize for the inconvenience caused by the cell overriding issue when multiple ranges are placed in the same column. Could you kindly provide your standalone sample Java code that you are using? Additionally, we would greatly appreciate it if you could share a sample Excel file illustrating your expected results. This will help us evaluate the issue more accurately and work towards a solution that aligns with your desired outcome.
Hi, please find the expected output template, data, and current output in the attachment
@Test
void generatedDocumentWithExcel() {
try {
String data = "template-nested-index-data.json";
String fileName = "src/test/resources/input/excel/templates/valid-template-array-direct-access-using-index-with-range.xlsx";
final WorkbookDesigner designer = new WorkbookDesigner();
designer.setWorkbook(new Workbook(fileName));
String[] smartMarkers = designer.getSmartMarkers();
// List<String> smartMarkersList = Arrays.asList(smartMarkers);
// log.debug("Got smart markers {}", smartMarkersList);
String jsonFile = testFileUtils.readJsonFile("input/excel/data", data);
designer.setJsonDataSource("node", jsonFile);
designer.setCalculateFormula(true);
designer.process();
designer
.getWorkbook()
.save("src/test/resources/input/excel/range-output.xlsx", SaveFormat.XLSX);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
range-updated.zip (35.6 KB)
@pgcentric
By testing with sample files and code on the latest version v25.8, we can reproduce the issue. The original data in the template has been overwritten when multiple ranges are placed in the same column.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-46495
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
The issues you have found earlier (filed as CELLSJAVA-46470,CELLSJAVA-46472,CELLSJAVA-46473) have been fixed in Aspose.Cells for Java 25.9.
@pgcentric
We have fixed issue : CELLSJAVA-46495.
Please check attached result:
CELLSJAVA46495.zip (12.2 KB)
This fix will be included into the next version 25.10
Hi, I am trying to conditionally render materials.C$Name
based on DSSection.C$Name
Key,
but it renders the whole list instead of rendering values related to "if "condition. Could you please check?
conditional.zip (52.9 KB)
@pgcentric
Materials.DSSection.C$Name are brother’s sons of Materials.C$Name according to levels.
If Materials.DSSection or Materials.DSSection.C$Name is an array ( we can not simply check what Materials.DSSection.C$Name is), we do not know how to compare.
Hi, when testing IF
in Cells Java smart markers, we observed that using comparison checks with <= , > ,
,‘>’ etc, results in the following error.
Exception in thread “main” java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke “com.aspose.cells.t05.f(com.aspose.cells.p5g)” because “” is null
Could you please check? Thanks
if_error.zip (16.0 KB)
Thanks for the template Excel file, JSON data file and sample code snippet.
After initial testing, I am able to reproduced the issue as you mentioned. I found an exception “java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "com.aspose.cells.t05.f(com.aspose.cells.p5g)
” when processing IF (using comparison checks with <= , > , ,‘>’ etc.) in smart markers.
We require thorough evaluation of the issue. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-46513
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@pgcentric
I have fixed this issue. It will be included into the next version 25.10.
BTW, I would like to use “where" or “filter” to replace this “if” smart marker. Which tag do you more like?
Hi, thanks for the quick response. Could you please share the reasoning behind this change? For example, is it intended to improve readability or address any technical limitations?
Additionally, we’d like to understand how complex conditions will be handled with this tag. Will it support logical combinations such as:
Expression1 || Expression2
Expression1 && Expression2
- or nested conditions like
(A && B) || C
?
Or if the user wants to handle complex condition, how he/she will be able to handle it in Smart Marker?
We don’t have any specific preference betweenwhere
andfilter
, so please feel free to use whichever option you think fits best. Thanks
@pgcentric
It’s a bug of calling calculating formulas. Some parameters were required .
It’s same as variable Expression as summary on Variables in Excel template - #72 by simon.zhao
You can use any valid Excel-like formula within them.
Hi, just to check if my understanding is correct, I tried this
&=node.books.price(if:{node.books.isAvailable} = {AND(node.books.price > 10,node.books.price < 15)})
This did not throw any error, but the expectation was that it should not print a value as the price is 20 in the payload, making
expression true = false
in if
, but in the output value of price got printed.
Thanks for your feedback with findings.
Your details have been recorded under the existing ticket “CELLSJAVA-46513” in our database for evaluation. Please wait for the next version, which will include all the enhancements.
@pgcentric
Please change the formula as &=node.books.price(if:{node.books.isAvailable} = AND({node.books.price} > 10,{node.books.price} < 20))
Please add curly brace for each variable。
I tested this it is throwing a runtime error. I guess this will work in 25.10, right?
Kindly wait for the release of the new version (Aspose.Cells v25.10), so you may evaluate and test your scenarios/cases with it based on our suggestions.