writing a telerik reportbook to asp page in excel format

2 posts, 1 answers
  1. Edney
    Edney avatar
    2 posts
    Member since:
    Apr 2014

    Posted 29 Apr 2014 Link to this post

    I have a method that sends a report out to the browser in excel format. It works fine if I pass it a report but when I pass it a report book I get the error "Excel found unreadable Content in 'MyReportName.xls'. Do you want to recover the contents of this workbook? If you trust the source of the workbook click Yes. When I click Yes it generates the workbook with all of the tabs in place the only issue is the first tab has the correct name and the remaining tabs are named Recovered_Sheet1, Recovered_Sheet2 ..... Recovered_Sheet10.
    private void WriteToExcel(IReportDocument report)
        ReportProcessor reportProcessor = new ReportProcessor();
        RenderingResult result = reportProcessor.RenderReport("xls", report, null);
        Response.ContentType = result.MimeType;
        Response.Expires = -1;
        Response.Buffer = true;
                           string.Format("attachment;FileName=\"{0}.xls\"", result.DocumentName));

    Thanks in advance for any and all help!
  2. Answer
    Stef avatar
    3611 posts

    Posted 01 May 2014 Link to this post

    Hi Edney,

    Please test the solution suggested by my colleague in the following forum thread: Errors when saving report book reports to Excel.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top