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.

Export Grid to Excel in AspNetCore

Thread ID:

Created:

Updated:

Platform:

Replies:

125280 Aug 4,2016 03:00 PM Nov 11,2016 05:07 AM ASP.NET Core 3
loading
Tags: Grid
Diego Hoyos
Asked On August 4, 2016 03:00 PM

With version14.2600.0.28-preview2-final how to export grid in Excel Format.

Karthick Kuppusamy [Syncfusion]
Replied On August 5, 2016 04:34 AM

Hi Diego, 
 
Thanks for Contacting Syncfusion support. 
 
We have analyzed your requirement and we have created a sample for your requirement. 
Please find the code example excel export. 
 
 
public IActionResult ExportToExcel(string GridModel) 
        { 
            ExcelExport exp = new ExcelExport(); 
            var DataSource = order; 
            GridProperties obj = ConvertGridObject(GridModel); 
            GridExcelExport exc = new GridExcelExport(); 
            exc.Theme = "flat-saffron"; 
            exc.FileName = "Export.xlsx"; 
            return exp.Export(obj, DataSource, exc); 
        } 
 
 
Sample link: 
 
Regards, 
K.Karthick. 


Gary Whiteside
Replied On November 10, 2016 06:32 AM

I've currently got the following packages added to my project.json

"Syncfusion.EJ.AspNet.Core": "14.3600.0.49-preview2-final",
"Syncfusion.Pdf.AspNet.Core": "14.3600.0.49-preview2-final",

What additional packages do I need to add to get the export to Word, Excel and PDF to work?

Thanks



Mohammed Farook J [Syncfusion]
Replied On November 11, 2016 05:07 AM

Hi Diego,  
 
If you need to export option , please includes the following dll’s in your project. 
 
 
"Syncfusion.EJ.AspNet.Core": " 14.3600.0.49-preview2-final", 
    "Syncfusion.Pdf.AspNet.Core": " 14.3600.0.49-preview2-final", 
    "Syncfusion.DocIO.AspNet.Core": " 14.3600.0.49preview2-final", 
    "Syncfusion.XlsIO.AspNet.Core": " 14.3600.0.49-preview2-final", 
    "Syncfusion.EJ.Export": " 14.3600.0.49-preview2-final" 
 
 
 
 
Regards, 
J.Mohammed Farook 


CONFIRMATION

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.

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.

;