Asp.net SSRS报告中导出到excel时出错
我有SSRS报告,我正在尝试导出为excel格式。我可以这样做,但在成功保存后打开一个特定报告时,会出现缺少文件(css)的错误。 可能的问题和解决方案是什么?我只被一份报告卡住了。其余的工作正常。下面是我使用的代码:Asp.net SSRS报告中导出到excel时出错,asp.net,reporting-services,export-to-excel,Asp.net,Reporting Services,Export To Excel,我有SSRS报告,我正在尝试导出为excel格式。我可以这样做,但在成功保存后打开一个特定报告时,会出现缺少文件(css)的错误。 可能的问题和解决方案是什么?我只被一份报告卡住了。其余的工作正常。下面是我使用的代码: Response.Clear(); Response.ClearHeaders(); Response.Charset = ""; Response.ContentType = "Application/v
Response.Clear();
Response.ClearHeaders();
Response.Charset = "";
Response.ContentType = "Application/vnd.xls";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.AddHeader("content-disposition", "attachment;filename=SkillwiseHeadCount.xls");
Response.AddHeader("Cache-Control", "max-age=0");
Response.BinaryWrite(result);
Response.End();
以下是我在类似项目中的工作:
Response.ContentType = "text/csv";
string attachment = "attachment;filename=Report_" + DateTime.Now.ToString() + ".csv";
Response.AddHeader("content-disposition", attachment);
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Expires", "0");
我用了一个数据阅读器