Closed stoppeye closed 1 year ago
The equal sign should be stripped when inserting a formula into <f> tags (see Reference).
While Excel will still handle it correctly, it can cause errors in other applications (e.g. Google Sheets).
Adding ltrim on the value can fix this:
} elseif (is_string($value) && $value{0}=='='){ $file->write('<c r="'.$cell_name.'" s="'.$cell_style_idx.'" t="s"><f>'.self::xmlspecialchars(ltrim($value, '=')).'</f></c>');
fixed in https://github.com/mk-j/PHP_XLSXWriter/pull/321
The equal sign should be stripped when inserting a formula into <f> tags (see Reference).
While Excel will still handle it correctly, it can cause errors in other applications (e.g. Google Sheets).
Adding ltrim on the value can fix this: