public static function PHPExcel_Worksheet::extractSheetTitle in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Worksheet.php \PHPExcel_Worksheet::extractSheetTitle()
Extract worksheet title from range.
Example: extractSheetTitle("testSheet!A1") ==> 'A1' Example: extractSheetTitle("'testSheet 1'!A1", true) ==> array('testSheet 1', 'A1');
Parameters
string $pRange Range to extract title from:
bool $returnRange Return range? (see example):
Return value
mixed
5 calls to PHPExcel_Worksheet::extractSheetTitle()
- PHPExcel_Calculation::extractCellRange in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation.php - * Extract range values * *
- PHPExcel_Calculation::extractNamedRange in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation.php - * Extract range values * *
- PHPExcel_Reader_Excel2007::load in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Reader/ Excel2007.php - * Loads PHPExcel from file * *
- PHPExcel_Worksheet::cellExists in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php - Does the cell at a specific coordinate exist?
- PHPExcel_Worksheet::getCell in vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php - Get cell at a specific coordinate
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Worksheet.php, line 2654
Class
- PHPExcel_Worksheet
- PHPExcel_Worksheet
Code
public static function extractSheetTitle($pRange, $returnRange = false) {
// Sheet title included?
if (($sep = strpos($pRange, '!')) === false) {
return '';
}
if ($returnRange) {
return array(
trim(substr($pRange, 0, $sep), "'"),
substr($pRange, $sep + 1),
);
}
return substr($pRange, $sep + 1);
}