Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip equal sign when inserting formulas #213

Closed
stoppeye opened this issue Aug 9, 2018 · 1 comment
Closed

Strip equal sign when inserting formulas #213

stoppeye opened this issue Aug 9, 2018 · 1 comment

Comments

@stoppeye
Copy link

stoppeye commented Aug 9, 2018

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>');
@mk-j
Copy link
Owner

mk-j commented May 31, 2023

fixed in #321

@mk-j mk-j closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants