求解 Asp.net 导出Execl 后缀名xlsx 2007office 打开不会出错
求解 Asp.net 导出Execl 后缀名xlsx 2007office 不弹消息 急急!!!! --------------------编程问答--------------------你至少也得贴你那段导出的代码吧。。就这种提问题方式,急有啥用处。。 --------------------编程问答-------------------- public void ExportToSpreadsheet(DataTable dtSource, string strFileName)
{
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AppendHeader("Content-Disposition", "attachment; filename=" + strFileName + ".xls");
Response.BinaryWrite(System.Text.Encoding.UTF8.GetPreamble()); --------------------编程问答-------------------- Response.BinaryWrite(System.Text.Encoding.UTF8.GetPreamble());
这是什么意思?你不是应该写excel的文件内容吗?
*****************************************************************************
签名档: http://feiyun0112.cnblogs.com/
补充:.NET技术 , ASP.NET