Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
UltraGridExcelExporter exporting over 40,000 rows of data [speed issue]
posted

Hi,

I am trying to export data and I am facing the speed problems.

It takes about 5 mins to export 40,000 rows of data including all fancy style theme

So I am thinking removing all the fancy style theme would solve this issue, but it seems like the following code is not working.

this.DisplayLayout.Appearance.Reset();

I've also tried to create a temporary UltraGrid and assign just datasource and it didn't work. 

Is there other way to export just the data without any style? 

Parents
  • 469350
    Verified Answer
    Offline posted

    The line of code you have here: 

    this.DisplayLayout.Appearance.Reset();

    will simply reset just that one property, not ALL of the styling applied to the grid. To do that, you would have to essentially find and reset all of the Appearances you have applied to the grid and all of it's sub-objects. There's no silver bullet to do that. And you really don't want to do it in this way, anyway, because you don't want to affect the on-screen grid, only the export. 

    I think what you want to do is something like this: 

    this.ultraGridExcelExporter1.ExportFormattingOptions = Infragistics.Win.UltraWinGrid.ExcelExport.ExportFormattingOptions.None;

    This will tell the exporter to exclude formatting/styling from being copied from the grid to the export layout. You could, of course, customize this to just exclude some of the more expensive option. I would imaging that "Cell" is probably the biggest performance hit. 

    You might also consider limiting the user to exporting some kind of filtered sub-set of the data, rather than all 40,000 rows. No human user is going to want to deal with a 40,000 row spreadsheet, anyway. :) 

Reply Children
No Data