DOCX转换 [英] Docx conversion
问题描述
我在android系统做一些简单的docx转换应用程序。
I am doing simple docx conversion app in android.
File file = new File(path + "Sample1.docx");
FileInputStream fis = new FileInputStream(file);
XWPFDocument document = new XWPFDocument( fis);
XWPFWordExtractor extractor = new XWPFWordExtractor(document);
String docText = extractor.getText();
添加上面一行在我的onCreate方法。
Added the above line in my onCreate method.
包括dom4j的,poi3.8,POI-ooxml3.8,POI-XML-schema3.8&放大器; XMLBeans的罐子在libs文件夹中。
Included dom4j,poi3.8,poi-ooxml3.8,poi-xml-schema3.8 & xmlbeans jars in libs folder.
当我运行此我得到了错误的无法执行DEX:不是方法ID [0,0xFFFF的]:65536
When i run this i got the error Unable to execute dex: method ID not in [0, 0xffff]: 65536
一派,我得到了信息有关转换罐子DEX。
Googled and i got the info about converting jar to dex.
使用了地塞米松是可能的docx阅读?即使我不想XLSX&安培; POI的PPTX包。
With out dex is that possible docx reading? Even i dont want xlsx & pptx packages of poi.
我要隐蔽只有doc和DOCX文件。是否有任何单独的code只有DOC和放大器; DOCX转换
I want covert only doc and docx file. Is there any separate code for only doc&docx conversion.
感谢
推荐答案
我是能够使 JWord 下工作Android系统。有许多问题与Apache POI像你(换算成Dalvik的格式失败)。
I was able to make JWord working under Android. Had many issues with Apache POI like you have (Conversion to Dalvik format failed).
这篇关于DOCX转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!