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

Exporting to Excel Speed Issue

1 Answer 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 04 Mar 2010, 02:30 PM
Hello,

I have a data export screen which is exporting about 30,000 records in one scenario.  In this scenario, the data query takes about 2-3 seconds from the database when we run it in SQL, but it's taking 3-7 minutes to generate the Excel file.  In my page, I bind the grid when I have the results and the page spins while it generates the Excel file.

I'm generating the excel file from code via:

this

.rgResults.DataSource = set.Tables[0];

this.rgResults.DataBind();

this.rgResults.MasterTableView.ExportToExcel();


So I'm binding a data table.  The grid is statically on the page.  The UI of the grid is generated using AutoGenerateColumns, so I'm using whatever columns are there.  Getting the data from the adapter into the table is fast, so that isn't the issue.  The issue is the rendering of the data.

Can I speed that up somehow?  Or how can I debug this?  What might be affecting the slowness?  Is it just related to the amount of data?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Brian Mains
Top achievements
Rank 1
answered on 05 Mar 2010, 08:30 PM
Hello,

Nevermind, found this: http://www.google.com/url?sa=t&source=web&ct=res&cd=1&ved=0CAYQFjAA&url=http%3A%2F%2Fwww.telerik.com%2Fcommunity%2Fforums%2Faspnet-ajax%2Fgrid%2Fradgrid-very-slow-with-export.aspx&rct=j&q=RadGrid+export+to+excel+slow&ei=dmmRS6mjFYTAlAfq67z8AQ&usg=AFQjCNEhjjRhAEgFRPEPNpq-0X_0-TlifQ.

Note: by using Excel HTML, or exporting to CSV, and exporting only the data, I was able to gain significant performance benefits from this.  I downloaded 30,000 records in one minute using these options.  So for those struggling, this is an alternative.

HTH.
Tags
Grid
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Brian Mains
Top achievements
Rank 1
Share this question
or