用java就行了,具体的生成word我没有做过,但是我做过生成excel表哥的。下面附代码。改改,应该是直接可以的。(我用的是struts2,如果直接jsp也是可以的)
<s:form action="amrimsibaseday_getStatisticalDataToDemonstrateToDropWords?currentPage=1" method="post">
<%
response.setHeader("Content-disposition","attachment;filename=用户感知分析.xls");
response.setContentType("application/vnd.ms-excel; charset=GB2312");
%>
<table>
<caption>用户感知分析</caption>
<tbody>
<tr>
<th>掉话时间</th>
<th>用户IMSI</th>
<th>掉话次数</th>
<th>通话次数</th>
</tr>
<!-- 遍历每行 -->
<s:iterator value="aclist" var="itemList">
<tr>
<td>
<s:property value="#itemList.date_time" />
</td>
<td>
<s:property value="#itemList.imsi" />
</td>
<td>
<s:property value="#itemList.call_drop_num" />
</td>
<td>
<s:property value="#itemList.call_num" />
</td>
</tr>
</s:iterator>
</tbody>
</table>
</s:form>