4 error_reporting(E_ALL);
5 ini_set(
'display_errors', TRUE);
6 ini_set(
'display_startup_errors', TRUE);
7 date_default_timezone_set(
'Europe/London');
9 define(
'EOL',(PHP_SAPI ==
'cli') ?
PHP_EOL :
'<br />');
11 date_default_timezone_set(
'Europe/London');
40 require_once dirname(__FILE__) .
'/../Classes/PHPExcel.php';
47 array(
'',
'Rainfall (mm)',
'Temperature (°F)',
'Humidity (%)'),
48 array(
'Jan', 78, 52, 61),
49 array(
'Feb', 64, 54, 62),
50 array(
'Mar', 62, 57, 63),
51 array(
'Apr', 21, 62, 59),
52 array(
'May', 11, 75, 60),
53 array(
'Jun', 1, 75, 57),
54 array(
'Jul', 1, 79, 56),
55 array(
'Aug', 1, 79, 59),
56 array(
'Sep', 10, 75, 60),
57 array(
'Oct', 40, 68, 63),
58 array(
'Nov', 69, 62, 64),
59 array(
'Dec', 89, 57, 66),
183 $chart->setTopLeftPosition(
'F2');
184 $chart->setBottomRightPosition(
'O16');
194 $objWriter->save(str_replace(
'.php',
'.xlsx', __FILE__));
195 echo date(
'H:i:s') ,
" File written to " , str_replace(
'.php',
'.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) ,
EOL;
199 echo date(
'H:i:s') ,
" Peak memory usage: " , (memory_get_peak_usage(
true) / 1024 / 1024) ,
" MB" , EOL;
203 echo 'File has been created in ' , getcwd() ,
EOL;
static createWriter(PHPExcel $phpExcel, $writerType='')
Create PHPExcel_Writer_IWriter.
if($is_dev) echo "Review changes write something in WHATSNEW and and then commit with log PHP_EOL
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.