Syncfusion Essential XlsIO is a .NET Excel library used to create, read, and edit Excel documents. Using this library, you can start creating an Excel document in C# and VB.NET.
The following DataGrid objects are supported in XlsIO to export data from DataGrid to Excel.
Steps to export DataGrid to Excel:
Include the following namespace to create new DataGrid object.
Use the following namespace in Web application.
After the initialization set valid data sources to the DataGrid’s DataSource property. Here the DataTable object has been used for the DataSource property.
Note: GetDataTable() method returns DataTable of applicable data to import.
Use the following code snippet to create new Excel workbook object.
The following C#/ VB.NET complete code snippet shows how to export data from DataGrid to Excel using XlsIO.
A complete working DataGrid to Excel sample can be downloaded here.
Starting with v16.2.0.x, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, include a license key in your projects. Refer to link to learn about generating and registering Syncfusion license key in your application to use the components without trail message
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|