Set data type like number, text and date in excel column using Microsoft.Office.Interop.Excel in c#
To set a range to text: xlYourRange.NumberFormat = “@”; You can also prefix a value you put in a cell with an apostrophe for it to format it as text: xlYourRange.Value = “‘0123456”; To set a range to number xlYourRange.NumberFormat = “0”; Obviously if you want to set the format for the entire column then … Read more