title: How do I create a date-formatted cell using RubyXL?
body: <p>I'm using RubyXL to dynamically generate a spreadsheet file that contains some dates. The documentation is kind of sparse so I've been looking at the source, and it appears the library only has special handling for <code>Date</code> and <code>DateTime</code> when you call <code>change_contents</code>, so that's what I'm doing:</p>
  
  <pre><code>cell = sheet.add_cell_obj RubyXL::Cell.new(sheet, row_index, col_index)
  cell.change_contents(Time.now.to_datetime)
  </code></pre>
  
  <p>When I create a spreadsheet this way, Excel does not format those cells as dates. I'm guessing that I need to set some other field, perhaps <code>cell.datatype</code>, but I'm not sure. Or maybe I'm barking up the wrong tree. Does anybody know what to do?</p>