SQL 2012 - SSRS - Excel rendering error

  • Any idea how to resolve the below error, which I get when I am trying to export the report to Excel.

    Microsoft.ReportingServices.OnDemandReportRendering.ReportRenderingException: ExcelRenderingExtension: Value of cell at row 10, column 1 exceeds the maximum length for a string of 32767 characters.

  • Looks like you either need to split the column to multiple smaller columns or do a LEFT() on the column to fit it into Excel.

    Alternatively, you could export it as a .csv and not worry about truncating or splitting the data. You wouldn't be able to open it in Excel, though. I believe you ran into the hard limit of an Excel column size.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Is it because of Excel 2003. If I point it to Excel 2010/2013, would it be resolved?

    Also, is it possible to find which value is causing the issue. I tried looking at the value mentioned in error message. But it looks fine with just 5 characters.

  • balasach82 (11/16/2015)


    Is it because of Excel 2003. If I point it to Excel 2010/2013, would it be resolved?

    I don't know. You'd have to do a google search for the max size of a text column in Excel 2010/2013 to verify.

    balasach82 (11/16/2015)


    Also, is it possible to find which value is causing the issue. I tried looking at the value mentioned in error message. But it looks fine with just 5 characters.

    Since you're pulling from SQL Server, I advise doing a WHERE clause to check that column for a length equal to or greater than the character length in the error message. Use the LEN() function for that search.

    It's entirely possible you have spaces or hidden characters padding that column. You might also want to check that table to see what size the column in question is. If it's set up for VARCHAR(MAX), then you'll need to put a trim in there to export it to Excel. And that might not even work if the entire size is being used up by one value.

    You could also do a ORDER BY column DESC to see the max value of the column, or put a LEN(column) in your SELECT and ORDER BY that too.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Thanks. I will try out the options.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply