0
votes

Is there any java api which is similar to open xml sdk 2.0. Just I need to convert open office xml excel file to .xlsx file.

office xml excel file I'm creating by using xml and xslt. I tried apache poi to read xml excel file but getting invalid header format exception.

Thanks.

1

1 Answers

4
votes

Well, I believe the best API out there to handle *.xlsx files is Apache POI (it has *.xlsx support since 3.7 or so).

Some alternatives:

  • There was a project called JExcel API, but there's not much activity there in the last 3 or so years (and I'm not sure if it handles *.xlsx format, only *.xls, but I might be wrong).
  • I'm not sure, but the OpenOffice UDK might also help you. Unfortunately it is only a binding, and requires an installed implementation (i.e., you have to install OpenOffice in order to use it), which is not always a valid requirement on the server side if you do not have any X servers there.
  • Another option is something like using it through Jacob via COM. The pro is that you are able to access all ow the data, the con is COM, you need an installed Excel on your machine (and of course, it is a Windows-specific solution).

I believe the best way to stick to Apache POI, it is usually perfectly enough if you just want to read/write cell data.