Fix some errors with samples

This commit is contained in:
Progi1984
2016-03-22 14:25:49 +01:00
parent 114fc00763
commit 6e222bbdde
99 changed files with 820 additions and 929 deletions
+5 -5
View File
@@ -33,8 +33,8 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
date_default_timezone_set('Europe/London');
/** Include PHPExcel_IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
/** Include PHPExcel */
require_once dirname(__FILE__) . '/../src/Bootstrap.php';
if (!file_exists("05featuredemo.xlsx")) {
@@ -42,12 +42,12 @@ if (!file_exists("05featuredemo.xlsx")) {
}
// Use PCLZip rather than ZipArchive to read the Excel2007 OfficeOpenXML file
PHPExcel_Settings::setZipClass(PHPExcel_Settings::PCLZIP);
\PHPExcel\Settings::setZipClass(\PHPExcel\Settings::PCLZIP);
echo date('H:i:s') , " Load from Excel2007 file" , EOL;
$callStartTime = microtime(true);
$objPHPExcel = PHPExcel_IOFactory::load("05featuredemo.xlsx");
$objPHPExcel = \PHPExcel\IOFactory::load("05featuredemo.xlsx");
$callEndTime = microtime(true);
$callTime = $callEndTime - $callStartTime;
@@ -59,7 +59,7 @@ echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024
echo date('H:i:s') , " Write to Excel2007 format" , EOL;
$callStartTime = microtime(true);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
$callEndTime = microtime(true);