소스 검색

#1153: preserve leading zeroes (in "numeric" fields) in the Excel export.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3879 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 년 전
부모
커밋
ae122a17b3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      application/xlsxwriter.class.php

+ 1 - 1
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,'<c r="'.$cell.'" s="'.$s.'" t="n"><v>'.($value*1).'</v></c>');//int,float, etc
 		} else if ($cell_format=='date') {
 			fwrite($fd,'<c r="'.$cell.'" s="'.$s.'" t="n"><v>'.intval(self::convert_date_time($value)).'</v></c>');