|
保存为excel
<%
response.ContentType ="application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=1.xls"
%>
此方法不打开页面自动生成最终页面数据
按钮类生成:
保存为word
<input name="imageonclick="document.execCommand('saveas','true','.htm')"" type=button onClick="document.execCommand('saveas','true','coamdo_1.doc' )" value="保存为word文件" class="but">
保存为excel
<input name="imageonclick="document.execCommand('saveas','true','.htm')"" type=button onClick="document.execCommand('saveas','true','coamdo_1.xls' )" value="保存为excel文件" class="but"> |
|