From 38b90715e2783da7206d37befd962b2c68279d7f Mon Sep 17 00:00:00 2001 From: Toha Date: Thu, 8 Feb 2018 10:23:23 +0700 Subject: [PATCH] Fix formula string truncated at the end. Wrong use of substr() in commit 453f8f182140930f18fe9edaf8dc84cd5560c9a3 makes formula string truncated at the end. Signed-off-by: Toha --- src/PhpSpreadsheet/Writer/Xls/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Writer/Xls/Parser.php b/src/PhpSpreadsheet/Writer/Xls/Parser.php index 4bcdb928..00ead3c2 100644 --- a/src/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -563,7 +563,7 @@ class Parser private function convertString($string) { // chop away beggining and ending quotes - $string = substr($string, 1, -2); + $string = substr($string, 1, -1); if (strlen($string) > 255) { throw new WriterException('String is too long'); }