This is a migrated thread and some comments may be shown as answers.

Export Large Dataset To Excel

2 Answers 243 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Carl Herlitz
Top achievements
Rank 1
Carl Herlitz asked on 06 Oct 2016, 10:15 PM

I'm trying to export 100,000+ rows to Excel from the data grid, and as expected, I'm running into OutOfMemoryException issues. That's understandable, and I've seen your help articles that recommend we use Reporting when that may be the case.

I want to avoid that, though, for simplicity. It's much more preferable for our users if they can just click an export button, specify a location to save it, and just fire and forget, no matter how big the data set is or how long it would take.

So, my question to you is, is it possible to append to an existing Excel file when exporting from the grid view? This way, I can request say 5,000 entities at once, put the objects in a data grid, export it to the file selected by the user, and then request the next set of entities. Rinse and repeat. I want to batch the requests, since requesting 100,000+ rows will likely lead to a timeout anyway, so this would be really convenient. All I've seen in all your documentation, though, requires overwriting the existing file.

If that's not possible, can you provide any guidance on how else we could export 100,000+ rows to Excel without resorting to Reporting, while still leveraging the data grid or RadSpreadsheet?

2 Answers, 1 is accepted

Sort by
0
Carl Herlitz
Top achievements
Rank 1
answered on 07 Oct 2016, 10:21 PM

So, nevermind that last question... Turns out this approach doesn't work really well. Performance is terrible.

I instead started using your RadSpreadStreamProcessing library, but I'm still running into OutOfMemoryExceptions for 100,000+ rows. I'm trying to figure out what the issue is. Do you happen to know if there's a limit to the number of rows you can write to Excel using RadSpreadStreamProcessing? Your demo only goes up to 50K rows, but I haven't seen anything in your documentation that specifies if there's a limit or not.

0
Carl Herlitz
Top achievements
Rank 1
answered on 10 Oct 2016, 09:22 PM
You can probably just delete this thread. At this point, I'm 99% sure the out of memory issue is with Entity Framework, not RadSpreadStreamProcessing. Unless you know of a hard limit with that library, just delete.
Tags
GridView
Asked by
Carl Herlitz
Top achievements
Rank 1
Answers by
Carl Herlitz
Top achievements
Rank 1
Share this question
or