From aab9f0d91af4b73b7fb3042534dfe5c072682850 Mon Sep 17 00:00:00 2001
From: kkr-Christopher <91697610+kkr-Christopher@users.noreply.github.com>
Date: Tue, 8 Mar 2022 19:00:48 +0100
Subject: [PATCH] Fix '=' in Google Sheets
---
xlsxwriter.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xlsxwriter.class.php b/xlsxwriter.class.php
index e4ebdc5eb..450ec4702 100644
--- a/xlsxwriter.class.php
+++ b/xlsxwriter.class.php
@@ -369,7 +369,7 @@ protected function writeCell(XLSXWriter_BuffererWriter &$file, $row_number, $col
if (!is_scalar($value) || $value==='') { //objects, array, empty
$file->write('');
} elseif (is_string($value) && $value[0]=='='){
- $file->write(''.self::xmlspecialchars($value).'');
+ $file->write(''.self::xmlspecialchars(ltrim($value, '=')).'');
} elseif ($num_format_type=='n_date') {
$file->write(''.intval(self::convert_date_time($value)).'');
} elseif ($num_format_type=='n_datetime') {