當前位置:編程學習大全網 - 網站源碼 - java 自動生成word怎麽生成

java 自動生成word怎麽生成

用java生成word文檔

poi是apache的壹個項目,不過就算用poi妳可能都覺得很煩,不過不要緊,這裏提供了更加簡單的壹個接口給妳:

*

Copyright: Matrix Copyright (c) 2003

*

Company: Matrix.org.cn

* @author chris

* @version 1.0,who use this example pls remain the declare

*/

public class PdfExtractor {

public PdfExtractor() {

}

public static void main(String args[]) throws Exception

{

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

WordExtractor extractor = new WordExtractor();

String str = extractor.extractText(in);

System.out.println("the result length is"+str.length());

System.out.println("the result is"+str);

}

}

  • 上一篇:android多語言的糾結問題
  • 下一篇:快手直播電商數據分析需要註意的指標有哪些?
  • copyright 2024編程學習大全網