Here Mudassar Ahmed Khan has explained with an example, how to export DataSet or DataTable to Excel file in ASP.Net Core MVC.
The data from the database is fetched using ADO.Net into a DataTable.
Then the DataTable is exported and downloaded as Microsoft Excel file using ClosedXML Excel Library which is a wrapper for OpenXml Excel library.
↧