How to operate word in java (summary)

  This blog is used to summarize the method of java to operate word, because I have a project that will use java to operate word, so I write this blog to record it temporarily, and I have not found a comparison after reading a lot of information on the Internet. A perfect summary of the methods of operating word in java, so I want to write a blog to supplement the deficiencies in this aspect. (Because of my lack of experience, the implementation principle of the method is not explored here)

  First of all, in general, there are three types of java operations on word documents:

    1) Apache POI - Java API To Access Microsoft Format Files ( http://poi.apache.org/ ); it is all done through java and does not require com component support; it supports development under linux system.

    2) java2word is a component (class library) that calls MS Office Word documents in java programs. This component provides a set of simple interfaces, so that the java program can call its service to operate the Word document. Development under linux is not supported.

    3) The function of web development language to operate word is best to use third-party controls, look at this SOAOFFICE , you can also use js to write VBA. Support development under linux.

    4) jacob calls the system component dll, and operates the com component through the com bridge (a software programming technology of windows). Development in linux is not supported.

Some precautions :
  1. jacob (java com bridge, java com bridge) is divided into two parts, jacob.jar, jacob.dll, the versions of the two things should be the same when used, and they are also divided into 32-bit and 64-bit. The number of bits is related to the number of bits of the jdk, and has nothing to do with the number of bits of the operating system. Its principle is to call the system component dll through the jni function of java, operate the com component (a software programming technology of windows) through the com bridge, and finally complete the operation of the office document.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325772471&siteId=291194637