diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index 23a58b70..410025b7 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -1542,13 +1542,14 @@ class PHPExcel_Reader_Excel2007 extends PHPExcel_Reader_Abstract implements PHPE // Set print titles foreach ($extractedRange as $range) { $matches = array(); + $range = str_replace('$', '', $range); // check for repeating columns, e g. 'A:A' or 'A:D' - if (preg_match('/^([A-Z]+)\:([A-Z]+)$/', $range, $matches)) { + if (preg_match('/!?([A-Z]+)\:([A-Z]+)$/', $range, $matches)) { $docSheet->getPageSetup()->setColumnsToRepeatAtLeft(array($matches[1], $matches[2])); } // check for repeating rows, e.g. '1:1' or '1:5' - elseif (preg_match('/^(\d+)\:(\d+)$/', $range, $matches)) { + elseif (preg_match('/!?(\d+)\:(\d+)$/', $range, $matches)) { $docSheet->getPageSetup()->setRowsToRepeatAtTop(array($matches[1], $matches[2])); } }