From cb6839b24a1f5f58fac36519ec2fc8e4d88c3eda Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sat, 31 Dec 2011 16:19:50 +0000 Subject: [PATCH] Fix for cell or cell range styling, misinterpreting column reference git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@84608 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Reader/Gnumeric.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Classes/PHPExcel/Reader/Gnumeric.php b/Classes/PHPExcel/Reader/Gnumeric.php index 8496ebb4..aef8c83c 100644 --- a/Classes/PHPExcel/Reader/Gnumeric.php +++ b/Classes/PHPExcel/Reader/Gnumeric.php @@ -539,16 +539,13 @@ class PHPExcel_Reader_Gnumeric implements PHPExcel_Reader_IReader // foreach($sheet->Styles->StyleRegion as $styleRegion) { $styleAttributes = $styleRegion->attributes(); -// var_dump($styleAttributes); -// echo '
'; - if (($styleAttributes['startRow'] <= $maxRow) && ($styleAttributes['startCol'] <= $maxCol)) { - $startColumn = PHPExcel_Cell::stringFromColumnIndex($styleAttributes['startCol']); + $startColumn = PHPExcel_Cell::stringFromColumnIndex((int) $styleAttributes['startCol']); $startRow = $styleAttributes['startRow'] + 1; - $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : $styleAttributes['endCol']; + $endColumn = ($styleAttributes['endCol'] > $maxCol) ? $maxCol : (int) $styleAttributes['endCol']; $endColumn = PHPExcel_Cell::stringFromColumnIndex($endColumn); $endRow = ($styleAttributes['endRow'] > $maxRow) ? $maxRow : $styleAttributes['endRow']; $endRow += 1;