load("Excel2003XMLTest.xml"); $callEndTime = microtime(true); $callTime = $callEndTime - $callStartTime; echo '
Call time to read Workbook was '.sprintf('%.4f',$callTime)." seconds
\n"; // Echo memory usage echo date('H:i:s').' Current memory usage: '.(memory_get_usage(true) / 1024 / 1024)." MB

\n"; echo date('H:i:s') . " Write to Excel2007 format
"; $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); // Echo memory peak usage echo date('H:i:s') . " Peak memory usage: " . (memory_get_peak_usage(true) / 1024 / 1024) . " MB
"; // Echo done echo date('H:i:s') . " Done writing file.
"; ?>