November 15, 2015 at 10:13 am
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.
November 16, 2015 at 11:42 am
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.
November 16, 2015 at 11:51 am
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.
November 16, 2015 at 12:10 pm
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.
November 16, 2015 at 12:33 pm
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