Question: how to export data table to excel in asp.net c#?
Answer: 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. In this article I will explain with an example, how to export DataTable data to Excel file in ASP.Net using C# and VB.Net.