From 8a99b09e831d67de7183b40172c4b710fed84c53 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 26 Jan 2016 09:50:35 +0000 Subject: [PATCH] #1153: preserve leading zeroes (in "numeric" fields) in the Excel export. SVN:trunk[3879] --- application/xlsxwriter.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/xlsxwriter.class.php b/application/xlsxwriter.class.php index bb0d269ad..bfb1c7e9b 100644 --- a/application/xlsxwriter.class.php +++ b/application/xlsxwriter.class.php @@ -154,7 +154,7 @@ Class XLSXWriter $cell = self::xlsCell($row_number, $column_number); $s = isset($styles[$cell_format]) ? $styles[$cell_format] : '0'; - if (is_numeric($value)) { + if (is_int($value) || is_float($value)) { fwrite($fd,''.($value*1).'');//int,float, etc } else if ($cell_format=='date') { fwrite($fd,''.intval(self::convert_date_time($value)).'');