Json content is wrong when convert a xlsx file to json file by Aspose.Cells.
Env
Windows 10 .NET 4.7
Aspose.Cells for .NET 22.12
Code
var doc = new Aspose.Cells.Workbook(@"C:\Users\XCL\Desktop\test\source.xlsx");
var ops = new Aspose.Cells.JsonSaveOptions();
ops.ExportNestedStructure = true; // if remove this line or fill a string like 'ID' into first cell, it's OK.
doc.Save(@"C:\Users\XCL\Desktop\test\target.json", ops);
@xxtears
The value of A1 is numberic, so we can not process it as header.
Please change the value of A1 as string value now.
We will check whether we can export your template file as your excepted too.
@xxtears
We will enhance the feature about JsonSaveOptions.HasHeaderRow.
If JsonSaveOptions.HasHeaderRow is set as true, we will force the first row as header.
We have log it with issue it CELLSNET-52498.
@xxtears
It will be supported in the next release 23.1.
When 23.1 is released , please try the following codes with 23.1
Workbook workbook = new Workbook(Constants.sourcePath +“CellsNet52498.xlsx”);
var ops = new Aspose.Cells.JsonSaveOptions();
ops.ExportNestedStructure = true; // if remove this line or fill a string like ‘ID’ into first cell, it’s OK.
ops.HasHeaderRow = true;
workbook.Save(Constants.destPath + “CellsNet52498.json”, ops);
The issues you have found earlier (filed as CELLSNET-52498) have been fixed in this update. This message was posted using Bugs notification tool by johnson.shi