利用jsp生成excel格式文件
2011-08-02 11:50
302 查看
<%@ page language="java" import="java.util.*" pageEncoding="GB2312"%> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="/WEB-INF/tlds/test.tld" prefix="pig"%> <%@ page language="java" import="org.etone.fs.market.bean.movie.*"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Excel文档</title> </head> <meta http-equiv=Content-Type content="text/html; charset=GB2312"> <meta name=ProgId content=Excel.Sheet> <meta name=Generator content="Microsoft Excel 9"> <meta http-equiv=Content-Type content="text/html; charset=GB2312"> <%response.setHeader("Content-disposition","attachment;filename=surveywlan_exportData.xls");%> <body> <table id="list" width="100%" cellpadding="0" cellspacing="1" class="dg_borderstyle" border="1"> <tr> <th width="10%" style="background-color:#9FBFE3"><div align="center">记录日期</div></th> <th width="10%" style="background-color:#9FBFE3"><div align="center">热点类型</div></th> <th width="13%" style="background-color:#9FBFE3"><div align="center">上网类型</div></th> <th width="12%" style="background-color:#9FBFE3"><div align="center">手机号码</div></th> <th width="12%" style="background-color:#9FBFE3"><div align="center">地址建议</div></th> </tr> <s:iterator value="exportSurveyList" id="dto" status="sta"> <tr onMouseOver="MOver(this)" onMouseOut="Mout(this)" class="dg_alternatingitemstyle"> <td align="center" class="f"> ${dto.recmakedate} </td> <td align="center" class="f"> ${dto.type} </td> <td align="center" class="f"> ${dto.onlinetype} </td> <td align="center" class="f"> ${dto.mobileno} </td> <td align="center" class="f"> ${dto.address} </td> </tr> </s:iterator> </table> </body> </html>
相关文章推荐
- 利用jsp生成excel格式文件
- jsp导出excel文件并设定单元格格式
- jsp导出excel文件并设定单元格格式
- jsp导出excel文件并设定单元格格式
- web利用table表格生成excel格式问题
- 生成Excel *.xls 生成 xls的格式与文件扩展名指定的格式不一致
- 谁有jsp 页面生成PDF文件的格式
- NPOI 菜鸟实践行之根据指定的模板生成Excel 2003格式的文件 (一)
- jsp导出excel文件并设定单元格格式
- C# 生成Excel文件及表格内容格式编辑 excel模板流
- asp.net中利用XML描述文件和Excel模板相结合的方法生成Excel报表
- 在VS2010中利用MFC读取word、ppt、excel格式文件
- 使用jxl,Servlet,JSP 动态生成excel文件并提示下载的简单方法
- jsp利用POI生成Excel并在页面中导出的示例
- android多语言对应时 利用excel生成不同语言的string.xml文件
- 用jsp直接导出内存中生成excel文件
- 将excel中的若干列数据生成json格式文件
- 在Java中导出word、excel格式文件时JSP页面头的设置
- jsp导出excel文件并设定单元格格式
- 利用caffe生成 lmdb 格式的文件,并对网络进行FineTuning