I have a web forms application (.NET 3.5). On click on a asp.net button click, the data in the Grid should export to excel . Since, there are large datasets (more than 100k records), I want export to excel to happen in multiple chunks in separate excel files so that its performance is improved and user need not wait for a single big excel file to download.
Asked
Active
Viewed 253 times
0
-
By "Excel file" do you actually mean a CSV file, or an actual OOXML `*.xlsx` file? (and I don't mean a CSV file that's just been renamed with an `*.xlsx` file extension either). – Dai Apr 24 '20 at 09:37
-
Does this help? https://stackoverflow.com/questions/2339440/download-multiple-files-with-a-single-action – Dai Apr 24 '20 at 09:38
-
I note that you haven't posted any details about how you're collecting data to fill the downloaded data-file, nor how you're generating the files which are ultimately downloaded. We need more information. Also, are you sure that your users **want** to have to manually stitch-together multiple files themselves just because it saves them a few seconds of waiting for a download? – Dai Apr 24 '20 at 09:39
-
@Dai I am collecting data to be exported to excel from a normal datatable . I have to only now bother about exporting this normal datatable to excel . (i.e., data processing is already been done and put it in a Datatable) – Vrik Apr 24 '20 at 10:24
-
@Dai this link https://stackoverflow.com/questions/2339440/download-multiple-files-with-a-single-action is telling about how to download multiple files which are stored somewhere. But in my case I need to simply export all the data at runtime from a datatable to excel . Is there a way where we can do that ? – Vrik Apr 24 '20 at 10:32
-
Again, we need to know if you mean **real** OOXML files, or just plain CSV files - because writing CSV records in batches is very different to generating OOXML files. – Dai Apr 24 '20 at 10:36
-
@Dai Its OOXML files . Now, I used NPOI to export to excel which is pretty fast but still I want to chunk the data. – Vrik Apr 24 '20 at 14:00