POI操作word2003 ,在初始化HWPFDocuments时报错

追追追太阳 2016-02-21 11:43:50
public class POItest {
String filePath = "d:\\test\\poiTest.docx";

public POItest() {
// TODO Auto-generated constructor stub
FileInputStream fis = new FileInputStream(new File(filePath));
HWPFDocument doc = new HWPFDocument(fis);
Range rang = doc.getRange();
String text = rang.text();
fis.close();
}

public static void main(String[] args) {
// TODO Auto-generated method stub
}
}


报的错是:The type org.apache.poi.poifs.filesystem.DirectoryNode cannot be resolved. It is indirectly referenced from required .class files
...全文
570 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
wendingzhou 2017-03-07
  • 打赏
  • 举报
回复
缺少poi主jar

50,528

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧