We use Excel for a number of ad-hoc pivots / reports.
To get the data into Excel we have a general page with a simple DataGrid that we bind from a DataSet / DataTable. We "Import External Data" using this URL in Excel.
Unfortunately we have a query that returns around 100 columns and 40k rows. The Application server only has 2GB of RAM and the used memory jumps up by 1 gig and then causes a System.OutOfMemoryException.
I intend to rewrite the page that produces the DataGrid to manually create an HTML table by looping through a DataReader rather than loading it all into a DataTable. I also intend to put more memory into the server.
My question is, how can I get this one spreadsheet to update right now? Is there any quick fix I can do to the DataGrid to temporarily let it work? I have already turned ViewState off for the DataGrid.