Tutorial by Examples

//integer (not really needed unless you need to round numbers, Excel with use default cell properties) worksheet.Cells["A1:A25"].Style.Numberformat.Format = "0"; //integer without displaying the number 0 in the cell worksheet.Cells["A1:A25"].Style.Numberformat.Form...
//default DateTime patterns worksheet.Cells["A1:A25"].Style.Numberformat.Format = DateTimeFormatInfo.CurrentInfo.ShortDatePattern; //custom DateTime patters worksheet.Cells["A1:A25"].Style.Numberformat.Format = "dd-MM-yyyy HH:mm"; //or overwrite the patterns in ...
worksheet.Cells["A1:A25"].Style.Numberformat.Format = "@";

Page 1 of 1