title: OpenXML - Writing a date into Excel spreadsheet results in unreadable content
body: <p>I am using the following code to add a <code>DateTime</code> to a column in my spreadsheet:</p>
  
  <pre><code>var dt = DateTime.Now;
  r.AppendChild&lt;Cell&gt;(new Cell()
      { 
          CellValue = new CellValue(dt.ToOADate().ToString()),
          DataType = new EnumValue&lt;CellValues&gt;(CellValues.Date), 
          StyleIndex = 1,
          CellReference = header[6] + index
      });
  </code></pre>
  
  <p>When I try to open the file in Excel 2010, I get the error </p>
  
  <blockquote>
    <p>Excel found unreadable content in file.xlsx</p>
  </blockquote>
  
  <p>All is fine if I comment out the line.</p>
  
  <p>I have referred to <a href="https://stackoverflow.com/questions/2792304/how-to-insert-a-date-to-an-open-xml-worksheet">similar questions</a> on StackOverflow, but they basically have the same code as I do.</p>