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.
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)
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.
精彩评论