1个回答
展开全部
<%
if request.querystring("action")="toExcel" then
Response.ContentType="application/vnd.ms-excel"
Response.AddHeader "content-disposition","attachment;filename=aaa.xls"
end if
%>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5">表格什么样子,导出的excel就是什么样子 </td>
</tr>
<tr>
<td colspan="2">aaa </td>
<td>ggg </td>
<td>aaa </td>
<td>nnn </td>
</tr>
<tr>
<td rowspan="2">bbb </td>
<td>ccc </td>
<td>fff </td>
<td>ggg </td>
<td>iii </td>
</tr>
<tr>
<td>ddd </td>
<td>eee </td>
<td>ooo </td>
<td>ppp </td>
</tr>
</table>
<form action="?action=toExcel" method="post">
<input type="submit" value="导出到excel" />
</form>
if request.querystring("action")="toExcel" then
Response.ContentType="application/vnd.ms-excel"
Response.AddHeader "content-disposition","attachment;filename=aaa.xls"
end if
%>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5">表格什么样子,导出的excel就是什么样子 </td>
</tr>
<tr>
<td colspan="2">aaa </td>
<td>ggg </td>
<td>aaa </td>
<td>nnn </td>
</tr>
<tr>
<td rowspan="2">bbb </td>
<td>ccc </td>
<td>fff </td>
<td>ggg </td>
<td>iii </td>
</tr>
<tr>
<td>ddd </td>
<td>eee </td>
<td>ooo </td>
<td>ppp </td>
</tr>
</table>
<form action="?action=toExcel" method="post">
<input type="submit" value="导出到excel" />
</form>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询