title: Applying specific cell data format using POI
body: <p>I need to apply specific data format to cell.</p>
  
  <pre><code>XSSFCellStyle cellStyle  = workBook.createCellStyle();          
  XSSFDataFormat format = workBook.createDataFormat();
  cellStyle.setDataFormat(format.getFormat("m/d/yy h:mm"));
  dataCell.setCellType(1); //String
  dataCell.setCellStyle(cellStyle);
  </code></pre>
  
  <p>The data is being written but the problem is that the format is applied <strong>only</strong>  when I open excel sheet (in Excel application), click inside the cell with my data.<br>
  And then pressing Enter key. 
  Only then the format is applied. </p>
  
  <p>How can I apply the format without clicking on every cell?</p>