Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mk-j/PHP_XLSXWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
mk-j committed May 31, 2023
2 parents dcdcf63 + d521081 commit 67541cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xlsxwriter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class XLSXWriter
protected $company;
protected $description;
protected $keywords = array();
protected $tempdir;

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

0 comments on commit 67541cf

Please sign in to comment.