tags:

views:

1012

answers:

2

Is there a way to convert Excel 2003 XML file to Excel 2003 XLS format with Java? Or at least any open source framework that can do this?

Thanks, Matthew Huang

+1  A: 

You could use COM Automation to command excel from your Java app if you're on windows.

RommeDeSerieux
Thanks. But we are not using windows as the platform.
How about trying to command OpenOffice.org then instead? It has a java api and can be started in headless mode.
RommeDeSerieux
+1  A: 

I follow this market because my company has an Excel compatible spreadsheet component for .NET and I used to work for Actuate and led the development of Formula One for Java / e.Spreadsheet for 10+ years. The only product I am aware of that might do it is Aspose.Cells - they are a competitor of mine in .NET so I definitely have nothing to gain by mentioning them.

There are a number of free and non-free products for Java and .NET that will read and write xlsx and xls workbooks and some of these products convert between the two, including SpreadsheetGear for .NET which my company sells. Aspose is the only one I am aware of which supports the Excel 2003 SpreadsheetML file format (I have no idea how good their Excel 2003 SpreadsheetML support is).

One thing to consider is the fact that the Excel 2003 SpreadsheetML format is a dead end format and it is also an incomplete format. The preferred format going forward is the Excel 2007 Open XML (xlsx) format which is gaining widespread support and which you can learn about at openxmldeveloper.org. Of course, if you have files in the old format that you have to deal with, that does you no good.

Disclaimer: I own SpreadsheetGear LLC

Joe Erickson
Thanks for the reply. We are forced to use excel 2003 xml format because we'd have a lot of code rewrite to move away from it. We may end up doing that at some point. But for now, we want to explore the possibility of converting XML to a newer EXCEL format so that we can use POI. Any idea?