title: how to create a date cell using openxml 2.0
body: <p>Trying to create a date cell using the openXML 2.0 lib. In some cases the date is shown but excel gives an error when opening the file. If I remove the date cells it opens with no errors. Anyone know what's wrong?</p>
  
  <pre><code>Protected Function CreateCell(columnIndex As Integer, rowIndex As Integer, value As DateTime) As Cell
  
      Dim cell As New Cell()
      cell.DataType = CellValues.Date
      Dim v As CellValue = New CellValue()
      v.Text = value.ToString()
      cell.CellValue = v
      Return cell
  
  End Function
  
  Protected Function CreateCell(columnIndex As Integer, rowIndex As Integer, value As Double) As Cell
      Dim cell As New Cell()
  
      cell.DataType = CellValues.Number
      'cell.CellReference = getColumnName(columnIndex) &amp; rowIndex
      cell.CellValue = New CellValue()
      cell.CellValue.Text = value.ToString()
      Return cell
  End Function
  </code></pre>