title: Reading a date from xlsx using open xml sdk
body: <p>I have a date in format "4/5/2011" (month/day/year) in a xlsx file in one of the cells. Im trying to parse the file and load those data in some classes.</p>
  
  <p>So far the part where I parse the cell looks like this:</p>
  
  <pre><code>string cellValue = cell.InnerText;
  if (cell.DataType != null)
  {
      switch (cell.DataType.Value)
      {
          case CellValues.SharedString:
              // get string from shared string table
              cellValue = this.GetStringFromSharedStringTable(int.Parse(cellValue));
              break;
      }
  }
  </code></pre>
  
  <p>I hoped that date would be a cell.DataType. The truth is when parsing the cell with the date "4/5/2011", the value of cell.DataType is null and the value of the cell is "40638" and it is not an index to the shared string table. (I have tried that before and it ended up with an exception.)</p>
  
  <p>Any ideas?
  Thanks</p>