Exporting to Excel Speed Issue

2 posts, 1 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 04 Mar 2010 Link to this post

    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.
  2. Answer
    Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 05 Mar 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top