各位兄弟姐妹们帮个忙好吗?
(java)jsp页面上有个"导出"按钮,点击导出后想把结果集(集合rs-此集合已经把数据库中查出的数据封装到集合里)中的数据导出到自己想要保存的目录下。也就是说点击"导出"按钮后,页面弹出个window对话框,可选择保存目录。
想要源代码
小弟先谢谢了哈哈
(java)jsp页面上有个"导出"按钮,点击导出后想把结果集(集合rs-此集合已经把数据库中查出的数据封装到集合里)中的数据导出到自己想要保存的目录下。也就是说点击"导出"按钮后,页面弹出个window对话框,可选择保存目录。
想要源代码
小弟先谢谢了哈哈
解决方案 »
- 紧急求救,jsp页面取值问题
- 求解,高手帮忙
- 怎么取 里面的 邮编:200030
- spring xml定时器的详细配置
- Epopos在线网络操作系统,太牛了,不知道用什么技术开发的?
- 谁知道下面的错误是什么?????急急
- 求 batch update returned unexpected row count from update[0] 的解决方案
- 在struts2框架中,或者ibatis中的xml
- 怎么加密jsp页面阿?有其他好方法吗??
- 数据库中的中文在浏览器中显示为乱码,请问该如何解决!
- Tomcat内存泄漏很厉害,一般这个如何测试知道哪里除了问题
- 如何分步显示???????????????????????????????急求解
这里有一个
http://download.csdn.net/source/970487
String txt = (String)request.getAttribute("txt");
response.setContentType("application/txt");
response.setHeader("Content-disposition", "attachment;filename=table.txt");
BufferedOutputStream bos = null;
try {
bos = new BufferedOutputStream(response.getOutputStream());
bos.write(txt.getBytes());
} catch (IOException e) {
throw e;
} finally {
if (bos != null)
bos.close();
} %>
<%
response.addHeader("Content-Disposition", "filename="+new String("收入汇总财务接口".getBytes("GBK"),"ISO-8859-1")+".xls");
%>
<!-- 财务汇总 -->
<table class="tds" id="detailTable">
<thead>
<tr>
<th>admin</th>
<th>name</th>
</tr>
</thead>
<tbody>
<s:iterator value="FinanceList">
<tr> <td class="string">${indexId}</td>
<td class="string">${custId}</td>class="string">${strateGroup}</td>
</tr>
</s:iterator>
</tbody>
</table>在写个返回这个页面的方法就可以了