Free Support Forum - aspose.com

Excel to XML conversion using Aspose.cells for Java

Hi,


We have Aspose.Cells for Java license. we have requirement to convert excel template file into XML file. Does Aspose.Cell for Java has these feature? if yes. kindly share some tutorial.

Thanks
Chintan

Hi,

Thanks for your posting and using Aspose.Cells for Java.

You can convert your Excel documents into SpreadsheetML which is Xml based format using Aspose.Cells for Java.

Please see this article for your reference.

http://www.aspose.com/docs/display/cellsnet/SpreadsheetML+%28XLSX%2C+XML%29

Thanks for the prompt reply.


When i am using below code, it says “SpreadsheeML” is deprecated. and when i open converted XML file, it shows junk characters. We are using version 2.2.

workbook.save(“C:\official\data\converted_xls.xml”, FileFormatType.SPREADSHEET_ML);

Thanks
Chintan

Hi,

Thanks for your posting and using Aspose.Cells for Java.

You are using quite an older version of Aspose.Cells for Java. Please use the latest one: Aspose.Cells for Java 7.4.1. It will fulfill your needs.

Thanks for the reply. We have downloaded 7.3 version and still i am getting deprecated error.


Also retrieving Cell from row, cloumn is deprecated in 7.3. because getCell(row, column) shows me as deprecated

Cell cell = cells.getCell(0,0);

Thanks
chintan

Hi,


Please update your code in accordance with new versions’ API, so, you may use instead:
Cell cell = cells.get(0,0);

There are some significant changes from older versions (e.g version i.e. v2.5.4 or prior versions) and you have to update your code segments accordingly now. For your information, from the release of v7.x.x of Aspose.Cells for JAVA we have auto-ported our .NET version of the product. So, in case of features, APIs, efficiency, performance etc. there is not much difference b/w Aspose.Cells for Java and Aspose.Cells for .NET now. We recommend you to kindly go through the Aspose.Cells for JAVA Wiki Confluence Docs for complete reference. Also, see the document that will help you to know the significant changes in the APIs when you migrate from older versions to new versions of the product:
http://www.aspose.com/docs/display/cellsjava/How+to+Migrate+to+Aspose.Cells+7.0.0+or+Higher

Thank you.