|
JACOB:
Jacob is a bridge between Java and Microsoft's COM components. By using the DLL dynamic link library that comes with Jacob, the Program on Sun Java platform calls com through JNI!
:
Http://sourceforge.net/project/showfiles.php? Group_id = 109543 & package_id = 118368
There are many available versions. Now I am using: jacb_1.11.1
Function: supports word, PDF, and Excel operations and conversion!
JDK version: jdk1.4
Role of my implementation: Use plug-ins: create Word files in the format specified by word
Configuration description ::
Decompress the file: jacob_1.11.1.zip, copy Jacob. jar, and add it to classpath.
Copy Jacob. dll in the Java JDK bin directory
Use Jacob to interact with word.
Example of http://www.99inf.net/SoftwareDev/Java/54344.htm
The example is well done, and the annotations are well written.
Configuration instructions:
Http://www.danadler.com/jacob/
Download Jacob's package officially. Jacob-1.14.1
Configuration:
1. Jacob-1.14.1-x86.dll file, loaded into the system environment variable path.
2. Copy the jacob-1.14.1-x86.dll file to Windows/system32.
3. Copy the jacob-1.14.1-x86.dll file to JDK/bin.
Otherwise, the. dll file may not be found. The program cannot run.
In the following example, some strings are written to the specified word. Programs can run in. java files .. JSP and Servlet environments.
Tool. javapackage com. test;
Public class tool ...{
Public tool ()...{
}
Public static string [] splitstring (string STR, string split )...{
Return Str. Split (split );
}
}
Of course, the second file is not required and can be written directly in the previous class. The function of the method is to split the string and generate an array of small strings.
You can run the preceding example in JSP or servlet mode. Open a Word document to directly generate the content. And print it. |
|
|