Skip to content Skip to sidebar Skip to footer

Excel Export In Android

I need to export excel from my android app. I use Apache-POI library and I get en exception when I run my app 'NoClassDefFoundError'. But the class is in 'poi-ooxml-3.9-20121203.ja

Solution 1:

I have been trying to use Apache POI for my app too and my conclusion was that it has dependencies that conflict with Android. Atleast I was not able to make it work, even with a quite amount of effort.

If the excel documents you wish to export are rather simple, I would suggest using jxl instead. This library unfortunately only supports old excel formats though.

Lars Vogel has made a nice tutorial showing how this is done: http://www.vogella.com/articles/JavaExcel/article.html

Yet another argument for not using POI is the size of the library. It is rather big, hence leaving a huge impact on your app size.

If you really want to use POI, I suggest creating a simple web service for it, having your app call that to create the excel documents.

Solution 2:

you can use the latest poi 3.17 for excel xlsx format and run this on android ,provided you have eliminate all the duplicate classes bundle in the xmlbeans-2.6.0.jar, lot of duplicate classes are found under xml /streams and xml/utils, all you need to do is to use the normal zip manager such as 7 zip manager to open and delete off ,some of the examples are as below enter image description here all those duplicate classes found in the xmlbeans jar .

unfortunately , you can not use any POI method associate with call to java awt library specifically use by POI to work on picture resize or row resize.

thanks

link

Post a Comment for "Excel Export In Android"