I'm looking for a lightweight version of poi-3.8.jar to use it in an Android (private) app. I don't seem to be able to fit the whole 1.7Mb jar in the APK for some reason (and it would be wrong to do so anyway) and since I'm only looking for the doc -> html and xls -> html functionality, I'm not quite sure I need the whole jar file. I've spent a couple hours trying to figure out how to extract WordToHtmlExtracter.java in poi/hwpf/converter but it looks like it's using a lot of other stuff. Even if this doesn't really surprise me, I was thinking that maybe someone here would know which packages I can get rid of to make the jar smaller. I'll be glad to spend more time on it, unless someone here tells me it's a waste of time and that EVERYTHING in the sources is needed to convert doc to html files. I don't need anything that displays anything, I just need the "simple" doc to html (and xls to html if possible) features. I don't need anything related to PDF, powerpoint, outlook or whatever. Cheers
There have been a few discussions on the mailing list about packaging POI for android, you may want to review those in the archives Unfortunately, both reading and writing require very similar sets of classes. You could probably knock out a few classes, or quite a few methods, but there's not one whole package you could ignore Could you maybe split it into two bundles, one for POIFS+HSSF, and one for POIFS+HWPF, to keep the sizes down?
I'll try that, thanks!
Here is the list of common packages used by HSSF and HWPF: // common classes org.apache.poi.util org.apache.poi // OLE2 file system and properties org.apache.poi.poifs org.apache.poi.hpsf // office drawing org.apache.poi.ddf HWPF requires everything in org.apache.poi.hwpf A combination of org.apache.poi.hwpf.* and the above packages should be enough to run the doc2html convertor. HSSF requires the common stuff plus two package roots: org.apache.poi.hssf and org.apache.poi.ss That's it. P.S. I'm closing this ticket, it is more a question for poi-user than a bug in Bugzilla. Yegor