Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to parse strict *.xlsx file in Java

I need to parse data from xlsx file. Currently I'm using Jakarta-POI (v. 3.11) to do that. It handles fine some xlsx but not all. I noticed that the files that are not parsed properly are "strict xlsx" files saved with Office 2013. To be more exact this files are compliant with ISO29500 not ECMA-376 the difference is that in ISO29500 file there are relationships with type:

http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument

and Jakarta-POI is looking for:

String CORE_DOCUMENT = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"

Is there a way to make Jakarta-POI read this files?

like image 456
jethro Avatar asked May 30 '26 06:05

jethro


1 Answers

OOXML Strict Converter for Office 2010 may help if you need to resave the docs using an older format.

Some of the purl namespaces are listed on http://pyxb.sourceforge.net/PyXB-1.2.2/bundles.html (Jethro's link above appears to no longer work).

The up to date XML schema files can be found at: http://www.ecma-international.org/publications/standards/Ecma-376.htm

like image 96
PJ Fanning Avatar answered Jun 02 '26 20:06

PJ Fanning