Docx conversion

久未见 提交于 2019-12-11 14:57:24

问题


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(); 

Added the above line in my onCreate method.

Included dom4j,poi3.8,poi-ooxml3.8,poi-xml-schema3.8 & xmlbeans jars in libs folder.

When i run this i got the error Unable to execute dex: method ID not in [0, 0xffff]: 65536

Googled and i got the info about converting jar to dex.

With out dex is that possible docx reading? Even i dont want xlsx & pptx packages of poi.

I want covert only doc and docx file. Is there any separate code for only doc&docx conversion.

Thanks


回答1:


I was able to make JWord working under Android. Had many issues with Apache POI like you have (Conversion to Dalvik format failed).



来源:https://stackoverflow.com/questions/18488581/docx-conversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!