The issues you have found earlier (filed as CELLSJAVA-46502,CELLSJAVA-46495,CELLSJAVA-46513) have been fixed in Aspose.Cells for Java 25.10.
Hi, is the conditional smart marker limited to if clause only, or can we use else and else if clauses also? If yes, what is the syntax for that?
@pgcentric
We do not support “else if clauses”. You can use smart Expression &=&=if({node.a} == “abc”,{node.a},{node.b})
See Variables in Excel template - #71 by sagaofsilence.dev
Hi, I tried the above syntax, but facing a runtime exception
Error: Absent operand for '='(Based on cell Template!A90)
Could you please check?
dynamic_if.zip (14.2 KB)
@pgcentric
Please change the template expression to: &=&=if({node.books.price} =20,“Price is 20”,“Price is not 20”)
We can reproduce the issue by testing with the latest version v25.10 using the sample file and the following sample code. Unsupported token for Array when using if condition in smart markers.
Workbook workbook = new Workbook(filePath + "valid-template-if-condition-without-variables.xlsx");
WorkbookDesigner designer = new WorkbookDesigner();
designer.setWorkbook(workbook);
String jsonData = new String(Files.readAllBytes(Paths.get(filePath + "valid-template-if-condition-without-variables.json")));
designer.setJsonDataSource("node", jsonData);
designer.process();
designer.getWorkbook().calculateFormula();
designer.getWorkbook().save(filePath + "out_java.xlsx");
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-46534
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
Currently, variables in repeated formulas are only processed if a variable worksheet is present in the template file. Therefore, as a temporary solution, please create a new variable worksheet in the template file. Please check the attachment and use the following sample code for testing. result.zip (28.3 KB)
Workbook workbook = new Workbook(filePath + "valid-template-if-condition-without-variables.xlsx");
WorkbookDesigner designer = new WorkbookDesigner();
designer.setWorkbook(workbook);
String jsonData = new String(Files.readAllBytes(Paths.get(filePath + "valid-template-if-condition-without-variables.json")));
designer.setVariablesWorksheetName("variables");
designer.setContainsVariables(true);
designer.setJsonDataSource(null, jsonData);
designer.process();
designer.getWorkbook().save(filePath + "out_java.xlsx");
This is to inform you that your issue (Ticket ID: “CELLSJAVA-46534”) has been resolved. The fix/enhancement will be included in the upcoming release (Aspose.Cells v25.11) that we plan to release in the first half (approximately between the 10th and 15th) of November 2025. You will be notified when the next version is published.