I am using CarlosAg.ExcelXmlWriter library to create an Excel file in C #. If I process all the data as strings, everything works fine, but I need some cells that Excel will recognize as date fields. When I try to set the data type accordingly, the resulting Excel file does not open in Excel 2003 (or Excel 2007, for that matter).
In Excel 2003, I get the following error when loading:
Problems occurred in the following area during boot: Table
I use the following code to generate DateTime cells that cause the problem:
string val = DateTime.Now.ToString("MM/dd/yyyy");
row.Cells.Add(new WorksheetCell(val, DataType.DateTime));
Thanks.
source
share