我在android中做简单的docx转换应用。
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方法中添加了上面的一行。
在libs文件夹中包括dom4j、poi3.8、poi-ooxml3.8、poi-xml-schema3.8和xmlbeans jars。
当我运行它时,我发现错误无法执行dex:方法ID,不在0,0xffff: 65536中
我在谷歌上找到了关于把jar转换成dex的信息。
如果没有德克斯,那有可能是docx读数吗?甚至我也不想要xlsx和pptx软件包的poi。
我只想要秘密文件和文档文件。是否有任何单独的代码仅用于doc&docx转换。
谢谢
发布于 2013-08-30 08:05:38
我能够让JWord在安卓系统下工作。Apache有很多问题(转换到Dalvik格式失败)。
https://stackoverflow.com/questions/18488581
复制相似问题