Because MS Word and Excel support HTML text format, you can use Word or Excel to do a template, save it as a web page, and then change the HTML to JSP, you can dynamically fill the data part, you don't have to worry hard. Adjustment format Word page As long as the JSP head is set as follows: <% @ page contentType = "Application / MSWORD; charset = GBK"%> Excel as follows: <% @ Page ContentType = "Application / VND.MS-Excel; Charset = GBK "%> Using this method The client must install Office software, and the user will open the page directly in IE during IE. This method advantage is that template design, convenient adjustment, no need to use complex POI or JXL technology on server-side, there is no need to use ActiveX control technology, safer, more secure, and easy to implement better printing effects on the client.
Microsoft About Server Dynamically Create Office Documents (ASP Example): http://support.microsoft.com/default.aspx?scid=kb;n-us;301044& Simple example: Using Word to establish a document, the drawing table is as follows : -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- - Save as web page test.htm, rename Test.htm to test.jsp, modify the Guest, passers-by, male from the database dynamic query, as follows: <% @ Page ContentType = Application / Msword; charset = GBK "%> <% @ page import =" java.sql. * "%>
7.8 lbs wrawingGridVerticalSpacing>