Ticket Q565780
Visible to All Users

speed of export

created 11 years ago

hi
I use ExportService for exporting grid to excel
why does exporting work slow? for 4000 rows it takes 20 sec, it is not fine, Is there a way for have high speed in export to excel?
Thanks.

C#
private void ShowPrintPreview(GridControl grid) { SaveFileDialog xlsDialog = new SaveFileDialog { Filter = "XLSX Files | *.xlsx", DefaultExt = "XLSX" }; bool? result = xlsDialog.ShowDialog(); if (result == true) { System.IO.Stream fileStream = xlsDialog.OpenFile(); link = new PrintableControlLink(grid.View as IPrintableControl); link.PrintingSystem.ExportOptions.NativeFormat.Compressed = true; link.ExportCompleted += link_ExportDownloadCompleted; link.ExportStarted += link_ExportStarted; link.PrintStarted += link_PrintStarted; link.ExportServiceUri = "../ExportService1.svc"; link.CreateDocument(true); link.CreateDocumentFinished += (s, args) => { link.ExportToXlsx(fileStream, new XlsxExportOptions() { ExportMode = XlsxExportMode.SingleFile, TextExportMode = TextExportMode.Value }, true); }; } } void link_PrintStarted(object sender, EventArgs e) { } void link_ExportStarted(object sender, EventArgs e) { } void link_ExportDownloadCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e) { if (e.Cancelled) { MessageBox.Show(e.Cancelled.ToString()); } if (e.Error != null) { MessageBox.Show(e.Error.Message); MessageBox.Show(e.Error.StackTrace); } else MessageBox.Show("Export succeed!"); if (link != null) link.Dispose(); }
Comments (3)
DevExpress Support Team 11 years ago

    Hello,
    I'm afraid that there is no way to accelerate this operation.
    You can try to build an XtraReport instead of exporting the grid control, but I can't guarantee that it will greatly increase the export performance in your case.

      Are you sure? there is no way?

      DevExpress Support Team 11 years ago

        Hello,
        There is no option to make the grid export faster. However, if you provide us with a sample illustrating the issue in action, I will forward it to our R&D team. They will examine your scenario in greater detail and check for a suitable solution.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.