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.
Unfortunately, activation email could not send to your email. Please try again.

How do I export the contents of Essential Grid to Excel using XlsIO?

 

You can export the contents of Essential Grid to an Excel spreadsheet using Essential Grid and Essential XlsIO. All the formatting and the contents of the grid are exported to the Excel spreadsheet using GridExcelConverterControl. However, since there is a difference in the feature set of Essential Grid and MS Excel, the closest equivalents are found in the exported file in case an exact equivalent could not be found. Since Essential XlsIO is a standalone library, it gives more flexibility to the developer while exporting the contents of the Grid to Excel. ConvertOptions enumerator provides four options for conversion. These helps in customizing the grid to Excel conversion.

Here is a code snippet

C#

//Export To Excel

GridExcelConverterControl converter = new GridExcelConverterControl();

converter.GridToExcel( gridControl1,"Sample.xls",ConverterOptions.Default);

VB

'Export To Excel

Dim converter As GridExcelConverterControl = New GridExcelConverterControl()

converter.GridToExcel(gridControl1,"Sample.xls",ConverterOptions.Default)

Here is a sample:

Excel Export Sample

Article ID: Published Date: Last Revised Date: Platform: Control:
1854 04/30/2011 07/10/2014 Windows Forms XlsIO
Tags:
Did you find this information helpful?
Comments
Daniel Silva López Sep 02, 2015
I get the "not defined object" error. I import "Imports Syncfusion.XlsIO", "Imports Syncfusion.GridExcelConverter" and "Imports Syncfusion.GroupingGridExcelConverter" and .NET don't find the libraries. And I don't find anything about XlsIO on the Syncfusion.Windows.Forms library.
Reply
Not Known Sep 04, 2015
Hi Daniel, You need to refer the following assemblies in your project to Export Grid contents to Excel. Syncfusion.XlsIO.Base Syncfusion.Grid.Base Syncfusion.Grid.Windows Syncfsuion.GridConverter.Windows Syncfusion.Shared.Base Syncfusion.Tools.Base . You can find the sample in Syncfusion Dashboard >> Grid >> Exporting to Excel. If you found any difficulties, please log on to our support website and create a direct-trac incident for further assistance on this. Support Link: https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents Regards, Mathu Mohan V A
Add Comment
You must log in to leave a comment

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.