We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51453db commit 0a66ce3Copy full SHA for 0a66ce3
src/PhpSpreadsheet/Calculation/Functions.php
@@ -158,6 +158,10 @@ public static function ifCondition($condition)
158
if (is_bool($condition)) {
159
return '=' . ($condition ? 'TRUE' : 'FALSE');
160
} elseif (!is_numeric($condition)) {
161
+ if ($condition !== '""') { // Not an empty string
162
+ // Escape any quotes in the string value
163
+ $condition = preg_replace('/"/ui', '""', $condition);
164
+ }
165
$condition = Calculation::wrapResult(strtoupper($condition));
166
}
167
0 commit comments