Forum guidelines
AuthorQuestion
Not able to export to excel using IE8
Posted on: 03 Apr 2013
Hi

I am getting the below error when exporting data  to excel from telerik grid(created a user control and using that) only in ie8 for https site.


I am using the below code for export functionality

     Response.ContentType = "text/csv";
     Response.AddHeader("content-disposition", "attachment; filename=filename.csv");
      Response.Write(csv);
     Response.End();

Note:cvs is a string builder which contains the data to export.

Please help me to resolve the issue.


AuthorReply
Re: Not able to export to excel using IE8
Posted on: 06 Apr 2013  
Have you checked Do not save encrypted pages to disk  option in Tools-->Internet options -->Advanced-->security module 

??
If it is checked then uncheck  and try.

Also if you are using cache anywhere in the page, set to no-cache.

Thanks & Regards,
Santhosh

Please mark this answer as accepted answer if it resolves your problem.
Re: Not able to export to excel using IE8
Posted on: 10 Apr 2013  
Thanks for your replay.

I have tried in that way also however the error existed.

Please find below the code which resolved my issue.

I am using telerikcontrol

gridControl.Page.Response.ClearHeaders();
gridControl.Page.Response.Cache.SetCacheability(HttpCacheability.Private);
gridControl.Page.Response.ContentType = "text/csv;";
 gridControl.Page.Response.AppendHeader("content-disposition", "attachment; filename=" + reportInfo.Description.Replace(" ", "_") + ".csv");
 gridControl.Page.Response.Write(csv);
 gridControl.Page.Response.End();

Note:
gridControl(Name of telerik:RadGrid)
csv is a string builder which contains the data to export

SPONSORED BY

Offshore Software and Database Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.