title: Using multiple number formats with names styles in openpyxl
body: <p>I'm using openpyxl to generate Excel files. I start by opening an existing workbook with some predefined styles such as 'MyHeading1', and then setting a cell equal to this style like so:</p>
  
  <pre><code>ws['D5'].style = 'MyHeading1'
  </code></pre>
  
  <p>That works, but what I'm struggling with is setting the correct number format. Some of the cells are numbers while others are dates. I've tried the following without success.</p>
  
  <pre><code>if isinstance(value, datetime.date):
      cell.number_format = 'dd-mmm-yy'
  else:
      cell.number_format = '# ##0.00'
  </code></pre>
  
  <p>So my question is what is the correct way to deal with multiple number formats where the other formatting of the cell is the same?</p>