mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-10-18 10:00:21 +00:00
Fix some errors with samples
This commit is contained in:
@@ -35,12 +35,12 @@ define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
||||
date_default_timezone_set('Europe/London');
|
||||
|
||||
/** Include PHPExcel */
|
||||
require_once dirname(__FILE__) . '/../Classes/PHPExcel.php';
|
||||
require_once dirname(__FILE__) . '/../src/Bootstrap.php';
|
||||
|
||||
|
||||
// Create new PHPExcel object
|
||||
echo date('H:i:s') , " Create new PHPExcel object" , EOL;
|
||||
$objPHPExcel = new PHPExcel();
|
||||
$objPHPExcel = new \PHPExcel\Spreadsheet();
|
||||
|
||||
// Set document properties
|
||||
echo date('H:i:s') , " Set document properties" , EOL;
|
||||
@@ -90,7 +90,7 @@ $objPHPExcel->setActiveSheetIndex(0);
|
||||
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);
|
||||
$callTime = $callEndTime - $callStartTime;
|
||||
|
||||
Reference in New Issue
Block a user