title: Primefaces dataExporter to xls Float number becomes text in spreadsheet cell
body: <p>Environment:</p>
  
  <ul>
  <li>jsf 2.2</li>
  <li>primefaces 6.1</li>
  <li>wilfly 10</li>
  </ul>
  
  <p>I'm trying to export a dataTable to an excel with dataExporter from primefaces, but I'm firstly getting</p>
  
  <pre><code>&lt;p:commandButton id="btnExpExcel"
                   alt="#{msgs.inv_exportinvoices}"
                   ajax="false"&gt;
      &lt;p:dataExporter type="xls" target="lstFactures" 
                      fileName="invoices"/&gt;
  &lt;/p:commandButton&gt;
  &lt;p:dataTable id="lstFactures" var="inv"
  ...
  </code></pre>
  
  <p><strong>Option 1</strong> I get in xls pex. 83.2 but we use , as decimal instead of .</p>
  
  <pre><code>...
  &lt;p:column headerText="#{msgs.total}"&gt;
      &lt;h:outputText value="#{inv.total}"&gt;
          &lt;f:convertNumber locale="#{localeBean.locale}"/&gt;
      &lt;/h:outputText&gt;
  &lt;/p:column&gt;
  ...
  </code></pre>
  
  <p><strong>Option 2</strong> I get in xls pex. 83,2 but excel deal with that as text instead of number</p>
  
  <pre><code>...
  &lt;p:column headerText="#{msgs.total}"&gt;
      &lt;h:outputText value="#{inv.total}" /&gt;
  &lt;/p:column&gt;
  ...
  </code></pre>
  
  <p>**Option3 ** with 
  
  <p>public void postProcessXLS(Object document) {
          HSSFWorkbook wb = (HSSFWorkbook) document;
          HSSFSheet sheet = wb.getSheetAt(0);
          HSSFRow header;</p>
  
  <pre><code>    HSSFCellStyle cellStyle = wb.createCellStyle();
      cellStyle.setFillForegroundColor(HSSFColor.GREEN.index);
      cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);
      int ind = 0;
      for (int row = 0; row &lt; invoices.size() + 1; row++) {
          header = sheet.getRow(row);
          for (int col = 0; col &lt; header.getPhysicalNumberOfCells(); col++) {
              ...
                  }
                  if (col == 5) {
                      HSSFCell cell = header.getCell(col);
                      //Total is a float
                      cell.setCellValue(invoices.get(ind).getTotal());
                      ind++;
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>I also tried to exportFuction="#{inv.total}" but I got some kind of error exportFunction="#{inv.total}": Method not found...</p>
  
  <p>What I'm getting in xls is the following</p>
  
  <p><a href="https://i.stack.imgur.com/prUX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/prUX4.png" alt="enter image description here"></a></p>