We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error exporting grid to excel

Thread ID:





128993 Feb 20,2017 04:50 PM UTC Feb 21,2017 11:31 AM UTC ASP.NET Web Forms 1
Tags: Grid
Danferd Lan
Asked On February 20, 2017 04:50 PM UTC

I was trying to export the Grid to excel that bind to datatable but i'm getting the error, "Thread was being aborted".

Private Sub SqReadBonusComm()
            GV.gvSql = "SELECT * " &
                        "FROM dbo.Bonus_Summary (NOLOCK) " &
                        "WHERE MEMBER_ID = '" & USR.ID & "' " &
                        "AND Type <> 'Payout'"

            GV.CreateDataTable(DB, GV.gvSql, cnnMain)

            Session(MsFg1SesBonusComm) = GV.gvDataTable.DefaultView.ToTable

            gBonusComm.DataSource = Session(MsFg1SesBonusComm)
        Catch ex As Exception
            SystemErrorsAlert("SqReadBonusComm", ex.Message, Me.Page)
        End Try
    End Sub

Protected Sub FlatGrid_ServerExcelExporting(sender As Object, e As Syncfusion.JavaScript.Web.GridEventArgs)
            Dim exp As New ExcelExport()
            Dim dt As DataTable = DirectCast(Session(MsFg1SesBonusComm), DataTable)

            exp.Export(gBonusComm.Model, dt, "Export.xlsx", ExcelVersion.Excel2010, True, True, "flat-lime")
        Catch ex As Exception
            SystemErrorsAlert("FlatGrid_ServerExcelExporting", ex.Message, Me.Page)
        End Try
    End Sub

Jayaprakash Kamaraj [Syncfusion]
Replied On February 21, 2017 11:31 AM UTC

Hi Danferd, 

Thank you for contacting Syncfusion support. 

We have created a sample with custom button to export grid data. Please refer to the below link.    

Also, we have provided “DataTable Support for exporting” from v14.1.0.41. So if you are using older version, please upgrade to the new version.   

Please download the latest version from the below link.  

Please follow the below steps. 

1)      Download and install the Essential Studio v15.1.0.33 .  
2)      Replace the Syncfusion scripts, CSS and DLL’s in your project from the following location. 

            Scripts and CSS: C:\Program Files (x86)\Syncfusion\Essential Studio\XX.X.X.XX\JavaScript\assets 
            Dlls: C:\Program Files (x86)\Syncfusion\Essential Studio\ XX.X.X.XX \Assemblies 

Here XX.X.X.XX denotes the product version( 

And also after upgrading please ensure to clear the browser cache to avoid accidental reference of the old scripts/CSS. 

If the issue has still not resolved, please provide the following details,  

1.       Attach a screenshot of your stack trace.      
2.       Share the video to show the issue. 
3.       Essential studio version and Browser details.   
4.       Issue replication procedure. 


Jayaprakash K. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon