Create Excel File From DataTable
Hello Friends, Many times we need to create Excel files in our application using existing Data. I have figured out a class which will help to create excel file by just passing DataTable and preferred location to generate on server. please download the cs file from here .. and use it :) here is full code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.Xml; public class ExcelHelper { private static readonly ExcelHelper _instance = new ExcelHelper(); public static ExcelHelper Instance { get { return _instance; } } /// <summary> /// Create one Excel-XML-Document with SpreadsheetML from a DataTable /// </summary> /// <param name="dataSource">Datasource which would be exported in Excel</param> /// <param name="fileName">Name of exported file</param> public ...