(编辑)好让我解释这一点更好。我有搜索页面,它根据不同的搜索条件寻找员工。现在,(由于在质量检查阶段发生了范围蔓延),我想增加出口按钮,将保存在MS-Excel表格员工过滤列表。我一直在研究Birt报告设计,但是我不认为这就是我正在寻找的,因为它试图建立一个独立的报告。我只想要将JSP页面表中显示的内容保存为excel。我想搜索结果的JSP表导出到MS-Excel的.xlsx等格式文件
<div id="searchResultsContents">
<p>Search Results:</p>
<display:table class="cspTable"name="searchEmployees" sort="list"
pagesize="10" requestURI="employeeSearch.html" cellspacing="0" cellpadding="0"
defaultsort="1" defaultorder="ascending">
<display:column property="fullName" title="Name" class="namesColumn"
sortable="true" href="showUser.html" paramId="employeeId"
paramProperty="employeeID" />
<display:column property="occupationalTitle.titleName" title="Title"
sortable="true" />
<display:column property="email" title="Email"
sortable="true" />
<display:column property="cycle.cycleName" title="Cycle"
sortable="true" />
<display:column property="realLocation.code" title="Location"
sortable="true" />
<display:column property="hireDate" title="Hire Date"
sortable="true" />
</display:table>
</div>
</div>
谢谢
仅供参考 - 下载总是来自服务器。您需要创建一个将数据传回浏览器的Servlet。通常我只是做一个CSV,但如果你想要XLSX,你可能需要模仿它使用的XML格式...... [你有什么尝试?](http://whathaveyoutried.com/) – 2012-02-28 20:24:05