因为ms word和excel的文档都支持html文本格式,因此可以先用word或excel做好模版,另存为Web页,然后将该html改成jsp,将数据部分动态填入即可,不用很辛苦的调整格式
word页面只要在jsp头设置如下指令:
<%@page contentType=" application/msword;charset=GBK" %>
excel如下:
<%@page contentType="application/vnd.ms-excel;charset=GBK" %>
http://newyaner.blog.sohu.com/84170098.html
word页面只要在jsp头设置如下指令:
<%@page contentType=" application/msword;charset=GBK" %>
excel如下:
<%@page contentType="application/vnd.ms-excel;charset=GBK" %>
http://newyaner.blog.sohu.com/84170098.html