From 09df4fd64776d586e6b6bbfd702bbf6c9a9d1490 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Thu, 3 Mar 2011 23:01:31 +0000 Subject: [PATCH] Bugfix: Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@69709 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Writer/Excel2007/Workbook.php | 5 +++++ changelog.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/Classes/PHPExcel/Writer/Excel2007/Workbook.php b/Classes/PHPExcel/Writer/Excel2007/Workbook.php index 3668779f..af3fa9c3 100644 --- a/Classes/PHPExcel/Writer/Excel2007/Workbook.php +++ b/Classes/PHPExcel/Writer/Excel2007/Workbook.php @@ -353,6 +353,11 @@ class PHPExcel_Writer_Excel2007_Workbook extends PHPExcel_Writer_Excel2007_Write // Create absolute coordinate and write as raw text $range = PHPExcel_Cell::splitRange($pSheet->getAutoFilter()); $range = $range[0]; + // Strip any worksheet ref so we can make the cell ref absolute + if (strpos($range[0],'!') !== false) { + list($ws,$range[0]) = explode('!',$range[0]); + } + $range[0] = PHPExcel_Cell::absoluteCoordinate($range[0]); $range[1] = PHPExcel_Cell::absoluteCoordinate($range[1]); $range = implode(':', $range); diff --git a/changelog.txt b/changelog.txt index a3314525..dc64c3dd 100644 --- a/changelog.txt +++ b/changelog.txt @@ -24,6 +24,7 @@ Fixed in SVN: +- Bugfix: (MBaker) Work item 15459 - Invalid cell coordinate in Autofilter for Excel2007 Writer 2011-02)27 (v1.7.6):