Java read and write Word file common technology

Source: Internet
Author: User

Java operation operation Word file, recently spent a few days to solve the problem of exporting data using Word template, collect some information to share.

The common techniques are as follows:


1. POI (Doc, docx file compatible)

Official website: http://poi.apache.org/

Many online examples, due to the release time earlier, many examples of foreign sites, suggest Google search


Bookmark Replace: http://apache-poi.1045710.n5.nabble.com/Replacing-the-value-of-the-bookmarks-td5710052.html

docx file Insert Picture bug fix: https://issues.apache.org/bugzilla/show_bug.cgi?id=49765

DOC file Insert Picture problem: Http://www.coderanch.com/t/466488/open-source/Inserting-table-image-doc-file

Comment: Discussion not in effect ~


Example of a picture replacement for docx template text: http://huangqiqing123.iteye.com/blog/1927761

Comments: The sample code is not particularly complete, and is barely available under simple modifications

......


2. Jacob

: http://sourceforge.net/projects/jacob-project/

Principle Explanation: http://www.ibm.com/developerworks/cn/java/j-lo-jacob/


Because only the Windows platform is supported, and the way COM components are called is suspected of performance issues, no in-depth research ~


3, docx4j

: http://www.docx4java.org/trac/docx4j

Example: http://zhuerg.blog.163.com/blog/static/1404016362014223102843969/

From the name you can see that only the docx file is supported


4, Java2word

Based on Jacob, ...


5, Pageoffice

Official website: http://www.zhuozhengsoft.com/

It looks good, it's powerful.


6, Apose

Official website: http://www.aspose.com/java/word-component.aspx

Heard also commercial charges, Detour ~


In addition, some references to frequently asked questions:

Word to set cell contents to automatically scale fonts

Http://blog.sina.cn/dpool/blog/s/blog_4bb01ea70100az32.html

Java read and write Word file common techniques

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.