none
How to catch "Excel Rendering Extension" exception RRS feed

  • Question

  • I have a reportViewer control in a web application, I display a big report and when I try to export it to Excel I get the "Excel Rendering Extension: Number of rows in the Excel sheet exceeded the limit of 65536 rows" exception, because the report is too big. That's OK, but I'd like to know if there is a way to catch this exception (I was running the application from the debugger and it didn't catch it) so I can handle it and display some warning message instead of the ugly exception message.
    Thanks and regards


    Friday, August 8, 2008 10:10 AM

All replies

  • The built in export option via the toolbar does not expose a way for you to handle exceptions.  But you can export a report manually by calling ReportViewer.LocalReport.Render() or ReportViewer.ServerReport.Render().  Those methods will throw an exception that you cna handle in the case of a rendering failure.
    Friday, August 8, 2008 8:18 PM
    Moderator
  • You can catch the erro in the global.asax.
    Thursday, September 1, 2011 9:05 PM