Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump squizlabs/php_codesniffer from 3.6.1 to 3.7.1 #27

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[XLSX] Fix sheet title extract function
XLSX extractSheetTitle return the quote character in sheet name

Fix PHPOffice#739
  • Loading branch information
guillaume-ro-fr committed Dec 1, 2021
commit 5ddb58d6346387d7b5ab355302a86ac3b788ab0d
9 changes: 8 additions & 1 deletion src/PhpSpreadsheet/Worksheet/Worksheet.php
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,14 @@ public static function extractSheetTitle($range, $returnRange = false)
}

if ($returnRange) {
return [substr($range, 0, $sep), substr($range, $sep + 1)];
$sheet = substr($range, 0, $sep);
if (($pos = strpos($sheet, "'")) !== false) {
$sheet = substr_replace($sheet, '', $pos, 1);
}
if (($pos = strrpos($sheet, "'")) !== false) {
$sheet = substr_replace($sheet, '', $pos, 1);
}
return [$sheet, substr($range, $sep + 1)];
}

return substr($range, $sep + 1);
Expand Down