I am using the following code to add a DateTime to a column in my spreadsheet:
var dt = DateTime.Now;
r.AppendChild| (new Cell()
{
|
private Cell CreateCellWithValue(DateTime columnValue, uint? styleIndex, string cellReference)
{
Cell c = new Cell();
c.DataType = CellValues.Number;
c.CellValue = new CellValue(columnValue.ToOADate().ToString(new CultureInfo("en-US")));
c.CellReference = cellReference;
c.StyleIndex = styleIndex;
return c;
}