XLS or XLSX to XML does not work

Dear support,

we are using Aspose Cells for Java 22.5.0. Saving workbook as XML does not include any data. Same by using the sample form on your home page (Java XLS to XML - XLS to XML Converter | products.aspose.com)

Any ideas?

Best Regards,

Steffen

@steffen.brehme.lobst,

It should be same as when you do open your Excel file into MS Excel manually and save it as “XML Spreadsheet 2003” spreadsheetML file. Do you find any difference? Let us know with details and sample Excel file and output XML file, we will check it soon.

… just on the run - please find the Excel file attached - will send the XML output tomorrow to you…Sample.xlsx.zip (6.6 KB)

@steffen.brehme.lobst,

I did test your scenario/case using both Aspose.Cells for .NET and Java 22.7 with your template XLSX file using the following sample code, it works absolutely fine and the output files (attached) are fine tuned.
e.g.
Sample code:

[C#.NET]

Workbook workbook = new Workbook("e:\\test2\\Sample.xlsx");
workbook.Save("e:\\test2\\out.xml");

[Java]

Workbook workbook = new Workbook("e:\\test2\\Sample.xlsx");
workbook.save("f:\\files\\out1.xml");

files1.zip (1.7 KB)

Which version of the API you are using? Please try using latest version and let us know your feedback.

It looks like an issue with the online converter (app). We will look into it soon.

As written in the first post: it is 22.5.0 and Java, but I can confirm that

wb.save(f.getPath()); //f = java.io.File

is working but

wb.save(out, FileFormatType.XML); //out = OutputStream

does not work and writes out the header only (my reported bug)

Regards,

Steffen

@steffen.brehme.lobst,

Please use SaveFormat.SPREADSHEET_ML instead of FileFormatType.XML in the line of code. It will fix your issue.

ok, does work with SaveFormat.SPREADSHEET_ML as well, thx.

You can close the ticket.

Best regards,

Steffen

@steffen.brehme.lobst,

Thanks for your feedback.

Good to know that the suggested API fixes your issue now. Feel free to write us back if you have further queries or issue, we will be happy to assist you soon.