I need help printing numbers with a decimal when it comes to thousands when generating an excel with php. What is happening is I want to show only a decimal when printing the sheet, but it happens that having numbers of thousands, for example, 1,298.8 shows me with two decimals and 1,298.80. It only happens with the thousands. The data in the database is fine. The headers that I have are the following:
date_default_timezone_set('America/Santiago');
header('Content-disposition: attachment; filename=ficheroExcel.xls');
header("Content-Type: text/plain; charset=UTF-8");
header('Content-Transfer-Encoding: 8bit');
header('Cache-Control: must-revalidate');
header('Pragma: public');