Skip to content

Commit 67541cf

Browse files
committed
Merge branch 'master' of https://github.com/mk-j/PHP_XLSXWriter
2 parents dcdcf63 + d521081 commit 67541cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xlsxwriter.class.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class XLSXWriter
1919
protected $company;
2020
protected $description;
2121
protected $keywords = array();
22+
protected $tempdir;
2223

2324
protected $current_sheet;
2425
protected $sheets = array();
@@ -369,7 +370,7 @@ protected function writeCell(XLSXWriter_BuffererWriter &$file, $row_number, $col
369370
if (!is_scalar($value) || $value==='') { //objects, array, empty
370371
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'"/>');
371372
} elseif (is_string($value) && $value[0]=='='){
372-
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="s"><f>'.self::xmlspecialchars($value).'</f></c>');
373+
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="s"><f>'.self::xmlspecialchars(ltrim($value, '=')).'</f></c>');
373374
} elseif ($num_format_type=='n_date') {
374375
$file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="n"><v>'.intval(self::convert_date_time($value)).'</v></c>');
375376
} elseif ($num_format_type=='n_datetime') {

0 commit comments

Comments
 (0)