It is difficult to generate Word in the Java environment. What is good for my point of view, what is used, and the language is not important. If our project is better with .NET, I will go to learn .NET, programming language? It's nothing. This project needs to generate Word in the Java environment. The specific requirements are this: the user passes the IE query information, but to save the query result to Word, the user's requirements are not too far, but how to implement it is very real. The headache, leaders, let's do the procedure. After I have searched each major website, the result is: can't be realized. Depressed, I am a development program, can't be trapped this small function, and then I will move, the problem is solved, so too much, feeling very emotion. What is it? First create a database, write the following code on the page.
Word p> body> html > Will connect to a new page.
The code is as follows: <% @ Page ContentType = "Application / MSWORD; Charset = GB2312"%> <% @ page import = "java.sql. *"%> <% Response.setheader ("Content-Disposition", "inline; FileName = TEST1.DOC "); // Online browsing mode response.sethead," attachment; filename = test1.doc "); // download method%>