When you say it's taking 15 minutes - is that how long it's taking to create and download the workbook? Or is that the amount of time taken by the line
I whipped up an example program with a fake datatable (with 59 columns and 100,000 rows), created a workbook, and streamed it to a memory stream. While it wasn't fast, it didn't take anywhere near 15 minutes. My fake data was just a lot of integers, though - what sort of data is in the table you're exporting? And how large is the file that's generated?
Also, how much memory is on the machine you're using? With that many rows and columns of data, maybe you're hitting the memory limits of the machine. My test program had to allocated a couple of gigs to run.
wb.Worksheets.Add(UserControls_ProductionExcelOutput.MatrixPROCOutputdt, "ProdMatrixOutput");
?I whipped up an example program with a fake datatable (with 59 columns and 100,000 rows), created a workbook, and streamed it to a memory stream. While it wasn't fast, it didn't take anywhere near 15 minutes. My fake data was just a lot of integers, though - what sort of data is in the table you're exporting? And how large is the file that's generated?
Also, how much memory is on the machine you're using? With that many rows and columns of data, maybe you're hitting the memory limits of the machine. My test program had to allocated a couple of gigs to run.