Bugfix: Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer
git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@86455 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
parent
18cc1dc7a3
commit
ffb8ccc362
|
@ -725,7 +725,17 @@ class PHPExcel_Writer_Excel2007_Worksheet extends PHPExcel_Writer_Excel2007_Writ
|
|||
if ($pSheet->getAutoFilter() != '') {
|
||||
// autoFilter
|
||||
$objWriter->startElement('autoFilter');
|
||||
$objWriter->writeAttribute('ref', $pSheet->getAutoFilter());
|
||||
|
||||
// Strip any worksheet reference from the filter coordinates
|
||||
$range = PHPExcel_Cell::splitRange($pSheet->getAutoFilter());
|
||||
$range = $range[0];
|
||||
// Strip any worksheet ref
|
||||
if (strpos($range[0],'!') !== false) {
|
||||
list($ws,$range[0]) = explode('!',$range[0]);
|
||||
}
|
||||
$range = implode(':', $range);
|
||||
|
||||
$objWriter->writeAttribute('ref', str_replace('$','',$range));
|
||||
$objWriter->endElement();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue