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(
'',
'',
'Budget',
'Forecast',
'Actual'),
48 array(
'2010',
'Q1', 47, 44, 43 ),
49 array(
'',
'Q2', 56, 53, 50 ),
50 array(
'',
'Q3', 52, 46, 45 ),
51 array(
'',
'Q4', 45, 40, 40 ),
52 array(
'2011',
'Q1', 51, 42, 46 ),
53 array(
'',
'Q2', 53, 58, 56 ),
54 array(
'',
'Q3', 64, 66, 69 ),
55 array(
'',
'Q4', 54, 55, 56 ),
56 array(
'2012',
'Q1', 49, 52, 58 ),
57 array(
'',
'Q2', 68, 73, 86 ),
58 array(
'',
'Q3', 72, 78, 0 ),
59 array(
'',
'Q4', 50, 60, 0 ),
134 $chart->setTopLeftPosition(
'G2');
135 $chart->setBottomRightPosition(
'P20');
142 echo
date(
'H:i:s') ,
" Write to Excel2007 format" ,
EOL;
145 $objWriter->save(str_replace(
'.php',
'.xlsx', __FILE__));
146 echo
date(
'H:i:s') ,
" File written to " , str_replace(
'.php',
'.xlsx', pathinfo(__FILE__, PATHINFO_BASENAME)) ,
EOL;
150 echo
date(
'H:i:s') ,
" Peak memory usage: " , (memory_get_peak_usage(
true) / 1024 / 1024) ,
" MB" , EOL;
153 echo
date(
'H:i:s') ,
" Done writing file" ,
EOL;
154 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.