There are many instance where we need to write an object in to CSV or Excel file, here is a CSVHelper class which will server this purpose. Below is the a user defined attribute, we need to apply this attribute to the properties which we want to write in Excel file. /// <summary> /// The name of the column for the CSV /// generated by a list of objects with /// properties marked with this attribute, /// if Export is true. Uses Order to order /// the properties on export /// </summary> public class CsvColumnNameAttribute : Attribute { public bool Export { get ; set ; } public int Order { get ; set ; } public string Name { get ; ...
(Helping you out with C#, ASP.NET, SQL, Microsoft Azure, MVC & Javascript)