how to export data from data table to excel in c#?
Try simple code, to convert DataTable to excel file as csv: var lines = new List<string>(); string[] columnNames = dataTable. Columns . Cast<DataColumn>() .