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

Wrong Perfomance Exporting to Excel

1 Answer 34 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Cesar
Top achievements
Rank 1
Cesar asked on 26 Aug 2011, 03:03 AM
Hello guys

Im using the 2011 Q1, for exporting data from gridview using the ExportToExcelML way, the data in the grid is about 100.000 rows and 50 columns, when use the RunExport method my application freeze, after 60 seconds fall in an exception. 

Follows the code implemented:

 Dim exporter As ExportToExcelML = New ExportToExcelML(vs.RadGridView1)
exporter.HiddenColumnOption = Telerik.WinControls.UI.Export.HiddenOption.DoNotExport
exporter.ExportVisualSettings = False
exporter.SheetMaxRows = ExcelMaxRows._65536
exporter.SheetName = ruta
exporter.SummariesExportOption = SummariesOption.ExportAll
exporter.RunExport(strExportedFile)

Are there any method to fix that error?

Regards

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Vasilev
Telerik team
answered on 29 Aug 2011, 02:33 PM
Hello Cesar,

Thank you for writing.

Although in theory ExportToExcelML can be used to export such large data, I would not recommend it, mainly because it creates files in a special xml format rather than in the native Excel format. That means exporting 100k rows and 50 columns would create enormously large file, which will be hard to be handled by Excel itself. 

Instead, I would recommend using ExportToCSV method. In your case, this approach will be more appropriate in terms of performance and functionality. 

Let me know if you have any additional questions.

All the best,
Martin Vasilev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Cesar
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or