Search code examples
reportviewerasp.net-4.0report-viewer2010

Microsoft ReportViewer over 65536 rows?


I have a ReportViewer version 10 in a WebForms project. When I export the data to excel (and theres is more than 65536 rows) I get an error. I guess it has something to do with the old/new Excel file format (BIFF or what ever). I guess if you could export to XSLX it would solve it.

Here the error msg: "Excel Rendering Extension: Number of rows exceeds the maximum possible rows per sheet in this format; Rows Requested: 287005, Max Rows: 65536"

Does anyone know if theres is a way to fix this, so I can export to an excel file with over 65536 rows/records?


Solution

  • This sounds more like an Excel issue but...

    When we had a similar problem, we decided rather than trying to make Report Viewer work we would take the opportunity to do the process properly.

    I would suggest not using ReportViewer to do the exporting and either write a process to dump the data out to CSV or use a third party library. We went with the CSV route.

    There are plenty of samples of using C#/VB and ASP.NET to output a CSV file from SQL Server.

    If you want the Excel formatting, you would be best to use a third party DLL (don't use the Office stuff as it requires you server have Office installed). That way you could do styling but take advantage of the newer file format limits.