We are pleased to inform you that your issue (logged earlier as “CELLSJAVA-45708”) has been resolved. The fix will be included in our upcoming release (Aspose.Cells v23.12) that we plan to release in the next week. You will be notified when the new version is published.
The issues you have found earlier (filed as CELLSJAVA-45708) have been fixed in Aspose.Cells for Java 23.12.
@mukulpurohit
Please check attached
cases.zip (35.7 KB)
And it’s better that you can set level ranges as “LevelRange” directory(see name ranges in Excel), then we can simply know which level the smar marker belongs.
@simon.zhao
Thank you for the update.
When I am with new version and the template - CellsJava45708_template2.xlsx shared by you
I am getting following error -
Caused by: java.lang.NullPointerException: Cannot invoke “Object.getClass()” because “< local5 >” is null
at com.aspose.cells.s0j.a(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.aspose.cells.s0j.a(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.aspose.cells.s0j.a(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.aspose.cells.WorkbookDesigner.a(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.aspose.cells.WorkbookDesigner.a(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.aspose.cells.WorkbookDesigner.process(Unknown Source) ~[aspose-cells-23.12.jar:23.12.0]
at com.ltimindtree.com.asposepoc.App.createFormExcelSheetFromTemplate(App.java:122) ~[classes/:na]
at com.ltimindtree.com.asposepoc.App.run(App.java:66) ~[classes/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:791) ~[spring-boot-2.5.4.jar:2.5.4]
I am using the code snippet you had sent along
public void CellsJava45708()
{
Workbook wb = new Workbook(Constants.sourcePath + “CellsJava45708_template2.xlsx”);
JsonSerializer serializer = new JsonSerializer();
// TextReader rdr = new StringReader(dir + “t (2).json”);
// ABC_1_Data p1 = (ABC_1_Data)serializer.Deserialize(new JsonTextReader(rdr), typeof(ABC_1_Data));
ABC_1_Data res = (ABC_1_Data)JsonConvert.DeserializeObject(File.ReadAllText(Constants.sourcePath + “CellsJava45708.json”), typeof(ABC_1_Data));
//
wb.Worksheets[0].Cells.CreateRange("A13:K19").Name = ("_CellsSmartMarkers");
// // Load the data from the input json file
List<ABC_1_Data> listFormData = new List<ABC_1_Data>();
listFormData.Add(res);
//
WorkbookDesigner designer = new WorkbookDesigner();
designer.LineByLine = (false);
designer.Workbook = (wb);
designer.SetDataSource("RootData", listFormData);
designer.SetDataSource("Directors", res.Directors);
designer.Process(true);
wb.Save(Constants.destPath + "CellsJava45708.xlsx");
Assert.AreEqual("DRFNAME2", wb.Worksheets[0].Cells["G31"].StringValue);
}
Can you please let me know If I am missing any code change here ?
Regards
Mukul
@mukulpurohit
CellsJava45708_template2.zip (9.8 KB)
Please try the above template file.
We will ignore CaseSensitive in the next Java version.
Thank you john …
One request … Please keep in loop about upcoming java releases.
Regards
Mukul
The issues you have found earlier (filed as CELLSJAVA-45708) have been fixed in Aspose.Cells for Java 24.1.