ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
XMLReader.php
Go to the documentation of this file.
1 <?php
29 error_reporting(E_ALL);
30 
31 date_default_timezone_set('Europe/London');
32 
34 require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
35 
36 
37 echo date('H:i:s') , " Load from XML file" , PHP_EOL;
38 $inputFileName = "XMLTest.xml";
39 
42 echo 'Loading ' , $inputFileName , ' using ' , $inputFileType , " Reader" , PHP_EOL;
43 
48 
49 
50 echo date('H:i:s') , " Write to Excel2007 format" , 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;
54 
55 
56 // Echo memory peak usage
57 echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , PHP_EOL;
58 
59 // Echo done
60 echo date('H:i:s') , " Done writing file" , PHP_EOL;
static identify($pFilename)
Identify file type using automatic PHPExcel_Reader_IReader resolution.
Definition: IOFactory.php:204
$objWriter
Definition: XMLReader.php:51
$inputFileName
Definition: XMLReader.php:38
static createReader($readerType='')
Create PHPExcel_Reader_IReader.
Definition: IOFactory.php:161
static createWriter(PHPExcel $phpExcel, $writerType='')
Create PHPExcel_Writer_IWriter.
Definition: IOFactory.php:132
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$inputFileType
Identify the type of $inputFileName.
Definition: XMLReader.php:41
$objReader
Create a new Reader of the type that has been identified.
Definition: XMLReader.php:45
Load from XML PHP_EOL
Definition: XMLReader.php:34
$objPHPExcel
Load $inputFileName to a PHPExcel Object.
Definition: XMLReader.php:47