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:
parent
d791a0bbeb
commit
e95a267034
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue