Apostrophes in sheet names prevented save

If a sheet name included an apostrophe and the sheet had print area
defined then the spreadsheet could not be saved because the cell
coordinates were mangled, eg:
'Fiche d''action'!$A$1:$N$19

wrongly became:
'Fiche d'$A$1:$N$19
This commit is contained in:
Adrien Crivelli 2016-10-02 20:21:13 +09:00
parent d791a0bbeb
commit e95a267034
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
1 changed files with 0 additions and 2 deletions

View File

@ -1655,7 +1655,6 @@ class Excel2007 extends BaseReader implements IReader
foreach ($xmlWorkbook->definedNames->definedName as $definedName) { foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
// Extract range // Extract range
$extractedRange = (string) $definedName; $extractedRange = (string) $definedName;
$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
if (($spos = strpos($extractedRange, '!')) !== false) { if (($spos = strpos($extractedRange, '!')) !== false) {
$extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
} else { } else {
@ -1730,7 +1729,6 @@ class Excel2007 extends BaseReader implements IReader
foreach ($xmlWorkbook->definedNames->definedName as $definedName) { foreach ($xmlWorkbook->definedNames->definedName as $definedName) {
// Extract range // Extract range
$extractedRange = (string) $definedName; $extractedRange = (string) $definedName;
$extractedRange = preg_replace('/\'(\w+)\'\!/', '', $extractedRange);
if (($spos = strpos($extractedRange, '!')) !== false) { if (($spos = strpos($extractedRange, '!')) !== false) {
$extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos)); $extractedRange = substr($extractedRange, 0, $spos) . str_replace('$', '', substr($extractedRange, $spos));
} else { } else {