29 error_reporting(E_ALL);
31 date_default_timezone_set(
'Europe/London');
34 require_once dirname(__FILE__) .
'/../Classes/PHPExcel/IOFactory.php';
37 echo
date(
'H:i:s') ,
" Load from XML file" ,
PHP_EOL;
52 $objWriter->save(str_replace(
'.php',
'.xlsx', __FILE__));
53 echo
date(
'H:i:s') ,
" File written to " , str_replace(
'.php',
'.xlsx', __FILE__) ,
PHP_EOL;
57 echo
date(
'H:i:s') ,
" Peak memory usage: " , (memory_get_peak_usage(
true) / 1024 / 1024) ,
" MB" , PHP_EOL;
60 echo
date(
'H:i:s') ,
" Done writing file" ,
PHP_EOL;
static identify($pFilename)
Identify file type using automatic PHPExcel_Reader_IReader resolution.
static createReader($readerType='')
Create PHPExcel_Reader_IReader.
static createWriter(PHPExcel $phpExcel, $writerType='')
Create PHPExcel_Writer_IWriter.
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$inputFileType
Identify the type of $inputFileName.
$objReader
Create a new Reader of the type that has been identified.
$objPHPExcel
Load $inputFileName to a PHPExcel Object.