This is a migrated thread and some comments may be shown as answers.
What is the maximum limit of columns and records that can be exported?
9 Answers 34 Views
This is a migrated thread and some comments may be shown as answers.
Kunal
Top achievements
Rank 1
Kunal asked on 02 Nov 2018, 06:00 PM
I am currently working on a task to export records from to excel file for a client in an . I want to know the maximum number of records and number of columns that can be exported using library. And I would also like to know the limitations of using this library for exporting large files with 3 to 5 lakhs of records.

9 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 07 Nov 2018, 02:02 PM
Hello Kunal,

The only limitations in the library are related to limitations in the XLSX files which do not allow more than 1,048,576 rows by 16,384 columns in a single worksheet. I tested exporting a worksheet which contains 50 columns and 10,000 rows and on my machine, the file was generated for ~2 seconds.

Hope this information is helpful.

Regards,
Tanya
Progress Telerik

0
Kunal
Top achievements
Rank 1
answered on 14 Nov 2018, 10:39 AM

Thank you for your reply . I have one more query hope you will help me with this as well.

I want to write the file to Azure Blob Storage rather than creating it in file path. Is it possible? If yes can you help me with a sample?

0
Tanya
Telerik team
answered on 19 Nov 2018, 09:36 AM
Hi Kunal,

You can pass a MemoryStream instance instead of the FileStream one so the content can be preserved in the MemoryStream. Once you are done with the generation, you can obtain the byte[] from the stream and save it according to your preferences.

Regards,
Tanya
Progress Telerik

0
Kunal
Top achievements
Rank 1
answered on 22 Nov 2018, 05:49 AM
Thank you for your reply . But using memory stream would crash my server. For example, there are 50 users simultaneously exporting 200,000 or 300,000 records from grid my server will crash. So using memory stream is not feasible for my problem. Any other solution would be helpful.
0
Kunal
Top achievements
Rank 1
answered on 24 Nov 2018, 11:00 AM
Instead of writing it to the memory stream. Can I use DataReader to get data from the database and pass 1 record at a time for writing it to the excel file? Is this possible if yes then can you provide me a sample?
0
Tanya
Telerik team
answered on 26 Nov 2018, 09:36 AM
Hello Kunal,

RadSpreadStreamProcessing needs an object of type Stream to store the content of the document inside it. Indeed, the MemoryStream wouldn't be an efficient approach to keep the generated files inside when you expect such a big number of customers exporting large data simultaneously. What I can suggest you is to preserve files on the file system so the memory is not occupied and transfer these files when the application is not so busy.

Using a DataReader is possible but for the library there isn't a difference how the data will be set - the content is always written in the same way no matter how the data is obtained. The important thing here is that once the exporter for a row or cell is closed, the element is no more accessible.

Hope this is helpful

Regards,
Tanya
Progress Telerik

0
Kunal
Top achievements
Rank 1
answered on 26 Nov 2018, 12:41 PM
Thank you for the solution . But what I did is used Azure queue to upload file on Blob storage using the same file stream which writes file locally. And then when the file was uploaded successfully I deleted it from the local file system. Hope this solution might help community users.  
0
Tanya
Telerik team
answered on 27 Nov 2018, 11:36 AM
Hello Kunal,

I am happy that you've reached a better solution for the case and thank you for sharing it with us. I believe it could help other users in this situation.

Regards,
Tanya
Progress Telerik

0
Richard
Top achievements
Rank 1
answered on 08 Jun 2019, 01:26 PM

Kunal:

Do you have any code that you can share that demonstrates the solution ?

Asked by
Kunal
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Kunal
Top achievements
Rank 1
Richard
Top achievements
Rank 1
Share this question
or