I J
I J

Reputation: 825

apache poi vs python xlrd

I was going to use apache poi or python xlrd on linux to read spreadsheets in a program on linux. I am biased towards python xlrd but apache poi seems like a more complete project to me (probably since its supported by the apache foundation). What would be a better choice (I am biased towards python but still..) ? I would like to be able to read most of the versions of excel and read macros.

Upvotes: 6

Views: 7607

Answers (2)

joefromct
joefromct

Reputation: 1556

One option to potentially give the best of both worlds would be to leverage Apache POI via Jython (python syntax with java interop).

Here is a dated jython example... i believe this will need to be changed with the newer version of POI.

Upvotes: 0

Gagravarr
Gagravarr

Reputation: 48326

Depending on the complexity of your needs, you could potentially just use the Apache Tika CLI. Tika handles talking to POI (and other libraries) and will give you back a XHTML or plain text version of the document. If you just want a simple linux command, that might be good enough.

Otherwise, it may depend on what your Java skills are like. POI should do everything you need, but you'll need to write a bit of code to grab the bits that interest you. Have a look at the quick guide to get you started.

(I don't know about xlrd, sorry)

Upvotes: 3

Related Questions