Excel导出在Android中 [英] Excel export in Android
问题描述
我需要出口从我的Android应用程序脱颖而出。我使用Apache的POI库,我得到异常恩,当我跑我的应用程序的NoClassDefFoundError。但类是在POI-OOXML-3.9-20121203.jar和罐子连接外部罐子。我想这是不可能的使用LIB在Android开发。任何想法或库,它可以帮助我为以下几点:
- 创建Excel文件
- 阅读并行添加到它
我一直在尝试使用Apache POI我的应用程序也是一样,我的结论是,它具有相关性,随着Android的冲突。至少我没有能够使它发挥作用,即使有精力相当数量。
如果您要导出的Excel文档都相当简单,我建议使用JXL代替。该库遗憾的是只支持旧的Excel格式,虽然。
拉尔斯沃格尔已经取得了很好的教程显示如何做到这一点: HTTP:// WWW .vogella.com /用品/ JavaExcel / article.html
然而,对于没有使用POI另一种说法是库的大小。这是相当大的,因此留在你的应用程序的大小产生巨大的影响。
如果你真的想使用POI,我建议为它创造一个简单的Web服务,让您的应用程序调用,以创建Excel文档。
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.jar" and the jar is connected as external jar. I suppose that it is impossible to use that lib in android development. Any idea or library which can help me for these points:
- Create Excel file
- Read and add rows to it
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.
这篇关于Excel导出在Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!