您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

C#将html table 导出成excel实例

2025/6/3 2:08:24发布14次查看
public void processrequest (httpcontext context) { string elxstr = "<table><tbody><tr><td>1</td><td>11</td></tr><tr><td>2</td><td>22</td></tr></tbody></table>"; context.response.clear(); context.response.buffer = true; context.response.appendheader("content-disposition", "attachment;filename=" + datetime.now.tostring("yyyymmdd") + ".xls"); context.response.contentencoding = system.text.encoding.utf8; context.response.contenttype = "application/vnd.ms-excel"; context.response.write(elxstr); context.response.end(); } public bool isreusable { get { return false; } }
更多c#将html table 导出成excel实例。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product