在asp.net中导出excel 中比较通行的做法是: Response.ContentType = "application/vnd.ms-excel";
然后直接向里面扔 html 的table
但是有中文的时候 老出现乱码,有很多解决方案,但都不能通盘解决, 就是在 输出html两头输出
Response.Write("<html><head><meta http-equiv=Content-Type content=/"text/html; charset=utf-8/">");
Response.Write("</body></html>");
或者
<meta http-equiv="content-type" content="application/ms-excel; charset=UTF-8"/>
<table>
<tr>
<td>cbcye@live.com </td>
<td>sky.com </td>
</tr>
<table>