Book- that saved as XML could not be opened by Excel without error

Hi.
I save a new book by API. And open saved file by Excel. It show me a message about wrong file format
@Test
public void bookTest() throws Exception {
Workbook book = new Workbook();
book.getWorksheets().get(0).getCells().get(0,0).setValue("FFFFF");
book.save("D://out.xml", FileFormatType.XML);
}

Hi,


Thanks for your posting and using Aspose.Cells.

Please use the following code and it will generate correct xml file which can be opened fine by Microsoft Excel.

Java
Workbook book = new Workbook();
book.getWorksheets().get(0).getCells().get(0,0).setValue(“FFFFF”);
book.save(dirPath + “out.xml”, SaveFormat.SPREADSHEET_ML);

Hi. It’s work for me. Thanks.

Hi,


Good to know that your issue is sorted out by the suggested code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.