Here Mudassar Ahmed Khan has explained with an example, how to export DataTable data to Excel file in ASP.Net using C# and VB.Net.
First the DataTable will be populated with records from Database and then using the data from DataTable will be exported to Excel using ClosedXml library which is wrapper of OpenXml library.
↧