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
+4 -4
View File
@@ -30,7 +30,7 @@ error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
/** PHPExcel_IOFactory */
/** \PHPExcel\IOFactory */
require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
@@ -38,17 +38,17 @@ echo date('H:i:s') , " Load from XML file" , PHP_EOL;
$inputFileName = "XMLTest.xml";
/** Identify the type of $inputFileName **/
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$inputFileType = \PHPExcel\IOFactory::identify($inputFileName);
echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL;
/** Create a new Reader of the type that has been identified **/
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objReader = \PHPExcel\IOFactory::createReader($inputFileType);
/** Load $inputFileName to a PHPExcel Object **/
$objPHPExcel = $objReader->load($inputFileName);
echo date('H:i:s') , " Write to Excel2007 format" , PHP_EOL;
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter = \PHPExcel\IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
echo date('H:i:s') , " File written to " , str_replace('.php', '.xlsx', __FILE__) , PHP_EOL;