gdds

POI读取word只能读取内容不能读取格式

tm-extractors-0.4.jar

import java.io.FileInputStream;

 

import org.textmining.text.extraction.WordExtractor;

 

public class Test {

    public static void main(String[] args) {

       try {

           FileInputStream in = new FileInputStream("d:\\a.doc");

           WordExtractor extractor = new WordExtractor();

           System.out.println(in.available());

           String str = extractor.extractText(in);

           System.out.println(str);

       } catch (Exception e) {

           e.printStackTrace();

       }

    }

}

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-16
  • 2021-07-24
  • 2022-12-23
  • 2021-06-17
  • 2021-07-21
  • 2022-12-23
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案