title: Number formatting phpspreadsheet with decimals not seen as numbers by the exported xlsx
body: <p>I have a page with a simle overview of rows with the costs of flights, hotel nights and a total, and it adds a export in xlsx with phpspreadsheet.
  The costs need to be shown in euros, in the format: </p>
  
  <pre><code>€ 1120,46
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>€ 1.120,46
  </code></pre>
  
  <p>Eitherway would be ok.</p>
  
  <p>The values of the flight costs are variable and are coming from the database, as decimal(6,2), from earlier user input. The hotel costs are a set amount (76) * number of days (based on flight dates).</p>
  
  <p>I'm also using the sum function in the spreadsheet, to add the totals of the colums, but the rest of the calucations is done via PHP and added as a value for the cells.</p>
  
  <p>For the cells with the numbers, using: </p>
  
  <pre><code>...-&gt;setFormatCode(PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_CURRENCY_EUR);
  </code></pre>
  
  <p>or the 'FORMAT_CURRENCY_EUR_SIMPLE', have the same results, but will the €-sign behind the number, not what I need. So I'm using this:</p>
  
  <pre><code>...-&gt;setFormatCode('[$€ ]#,##0.00_-');
  </code></pre>
  
  <p><strong>In the xlsx export it works great for numbers without decimal. The numbers show correctly and the sum function also works, including the €-sign at the right place.</strong></p>
  
  <p>But when the numbers contain decimals, it stops working like I want.</p>
  
  <p>If I add a number like '120.45', the xlsx export shows '120.45.0' and Excel doesn't report any problem plus the sum function doesn't calculate anything.</p>
  
  <p>If I add a number like '120,45, the xlsx export shows '120,45', but Excel reports that it is not a number and the sum function doesn't calculate anything. You can then click the warning triangle in Excel and make it a number. At this point it the value is added to the total by the sum function.</p>
  
  <p>Both options also failing to add the €-sign.</p>
  
  <p>I tried adding the numbers using these types of formatting on the PHP side:</p>
  
  <pre><code>$sheet-&gt;setCellValue('S5, number_format ($price, 2, ",", ""));
  
  $sheet-&gt;setCellValue('S5, number_format ($price, 2, ".", ""));
  
  $sheet-&gt;setCellValue('S5, str_replace(',','.',$price));
  
  $sheet-&gt;setCellValue('S5, str_replace('.',',',$price));
  </code></pre>
  
  <p>This yielded the same results as above for the decimal values, and 'number_format(...)' made the non-decimal values also as values, so non of the numbers and sum functions were working properly.</p>
  
  <p>Any idea's what this might be?</p>