composer update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* PHPExcel
|
||||
*
|
||||
* Copyright (C) 2006 - 2014 PHPExcel
|
||||
* Copyright (c) 2006 - 2015 PHPExcel
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -20,7 +20,7 @@
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
@@ -38,15 +38,11 @@ date_default_timezone_set('Europe/London');
|
||||
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
|
||||
|
||||
|
||||
if (!file_exists("05featuredemo.xlsx")) {
|
||||
exit("Please run 05featuredemo.php first." . EOL);
|
||||
}
|
||||
|
||||
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
|
||||
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
|
||||
$objPHPExcel = $objReader->load("05featuredemo.xlsx");
|
||||
$objPHPExcel = $objReader->load("./templates/28iterators.xlsx");
|
||||
|
||||
echo date('H:i:s') , " Iterate worksheets" , EOL;
|
||||
echo date('H:i:s') , " Iterate worksheets by Row" , EOL;
|
||||
foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
|
||||
echo 'Worksheet - ' , $worksheet->getTitle() , EOL;
|
||||
|
||||
@@ -64,5 +60,23 @@ foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
|
||||
}
|
||||
|
||||
|
||||
echo date('H:i:s') , " Iterate worksheets by Column" , EOL;
|
||||
foreach ($objPHPExcel->getWorksheetIterator() as $worksheet) {
|
||||
echo 'Worksheet - ' , $worksheet->getTitle() , EOL;
|
||||
|
||||
foreach ($worksheet->getColumnIterator() as $column) {
|
||||
echo ' Column index - ' , $column->getColumnIndex() , EOL;
|
||||
|
||||
$cellIterator = $column->getCellIterator();
|
||||
$cellIterator->setIterateOnlyExistingCells(true); // Loop all cells, even if it is not set
|
||||
foreach ($cellIterator as $cell) {
|
||||
if (!is_null($cell)) {
|
||||
echo ' Cell - ' , $cell->getCoordinate() , ' - ' , $cell->getCalculatedValue() , EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Echo memory peak usage
|
||||
echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
|
||||
|
Reference in New Issue
Block a user