简体   繁体   English

HWPFDocument在哪里? 我在POI项目中找不到它

[英]Where is HWPFDocument located? I can't find it in the POI project

Currently using: 目前使用:

<dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>3.10-FINAL</version></dependency>

I'm trying to write a simple program to get the word count of doc/x files. 我正在尝试编写一个简单的程序来获取doc / x文件的字数。 But some reason it is not able to find that specific method. 但是有些原因它无法找到具体的方法。 Is it in another package or something? 是在另一个包装或其他什么? I've been googling and they are all pointing me to that pom. 我一直在谷歌搜索,他们都指着我那个pom。

As detailed on the Apache POI Components and Dependencies page , for HWPF you also need to include a Maven dependency on the poi-scratchpad artifact. Apache POI组件和依赖关系页面所详述,对于HWPF,您还需要在poi-scratchpad工件上包含Maven依赖关系。

Your dependency in your pom will need to be something like: 你对pom的依赖需要是这样的:

<properties>
  <poi.version>3.11-beta2</poi.version>
 </properties>
<dependencies>
  <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>${poi.version}</version>
  </dependency>
  <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-scratchpad</artifactId>
    <version>${poi.version}</version>
  </dependency>
</dependencies>

(Non maven users need to add the poi-scratchpad jar from the binary package to their classpath, along with the poi jar you add now) (非maven用户需要将二进制包中的poi-scratchpad jar添加到他们的类路径中,以及你现在添加的poi jar)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM