From 2c36e2e66ed0942bd9d7283eddf7e0999315d86a Mon Sep 17 00:00:00 2001 From: wudi Date: Fri, 14 Jul 2017 17:17:23 +0800 Subject: [PATCH 1/3] Fix invalid method with get errorStyle --- Classes/PHPExcel/Writer/Excel5/Worksheet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/Classes/PHPExcel/Writer/Excel5/Worksheet.php index fb75499b1..a9204ea02 100644 --- a/Classes/PHPExcel/Writer/Excel5/Worksheet.php +++ b/Classes/PHPExcel/Writer/Excel5/Worksheet.php @@ -2860,7 +2860,7 @@ private function _writeDataValidity() $options |= $type << 0; // error style - $errorStyle = $dataValidation->getType(); + $errorStyle = $dataValidation->getErrorStyle(); switch ($errorStyle) { case PHPExcel_Cell_DataValidation::STYLE_STOP: $errorStyle = 0x00; break; case PHPExcel_Cell_DataValidation::STYLE_WARNING: $errorStyle = 0x01; break; From 464c285049716fb191ac912b4c66b83c1d3c1b38 Mon Sep 17 00:00:00 2001 From: wudi Date: Fri, 14 Jul 2017 17:19:07 +0800 Subject: [PATCH 2/3] Fix "A non-numeric value encountered" with bitwise operation --- Classes/PHPExcel/Writer/Excel5/Worksheet.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Classes/PHPExcel/Writer/Excel5/Worksheet.php b/Classes/PHPExcel/Writer/Excel5/Worksheet.php index a9204ea02..d135bb849 100644 --- a/Classes/PHPExcel/Writer/Excel5/Worksheet.php +++ b/Classes/PHPExcel/Writer/Excel5/Worksheet.php @@ -2856,6 +2856,7 @@ private function _writeDataValidity() case PHPExcel_Cell_DataValidation::TYPE_TIME: $type = 0x05; break; case PHPExcel_Cell_DataValidation::TYPE_TEXTLENGTH: $type = 0x06; break; case PHPExcel_Cell_DataValidation::TYPE_CUSTOM: $type = 0x07; break; + default: $type = 0x00; break; } $options |= $type << 0; @@ -2865,7 +2866,8 @@ private function _writeDataValidity() case PHPExcel_Cell_DataValidation::STYLE_STOP: $errorStyle = 0x00; break; case PHPExcel_Cell_DataValidation::STYLE_WARNING: $errorStyle = 0x01; break; case PHPExcel_Cell_DataValidation::STYLE_INFORMATION: $errorStyle = 0x02; break; - } + default: $errorStyle = 0x00; break; + } $options |= $errorStyle << 4; // explicit formula? @@ -2896,7 +2898,8 @@ private function _writeDataValidity() case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHAN: $operator = 0x05 ; break; case PHPExcel_Cell_DataValidation::OPERATOR_GREATERTHANOREQUAL: $operator = 0x06; break; case PHPExcel_Cell_DataValidation::OPERATOR_LESSTHANOREQUAL: $operator = 0x07 ; break; - } + default: $operator = 0x00; break; + } $options |= $operator << 20; $data = pack('V', $options); From a3f4ef16d26071efc2815dccbb00804c1b9d6545 Mon Sep 17 00:00:00 2001 From: Di Wu Date: Fri, 14 Jul 2017 17:39:43 +0800 Subject: [PATCH 3/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ff18cb842..d906031c7 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "phpoffice/phpexcel", + "name": "eaglewu/phpexcel", "description": "PHPExcel - OpenXML - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", "keywords": ["PHP","Excel","OpenXML","xlsx","xls","spreadsheet"], "homepage": "http://phpexcel.codeplex.com",