33_Chart_create_bar.php 430 B

123456789101112131415
  1. <?php
  2. use PhpOffice\PhpSpreadsheet\IOFactory;
  3. require __DIR__ . '/../Header.php';
  4. $spreadsheet = require __DIR__ . '/../templates/chartSpreadsheet.php';
  5. // Save Excel 2007 file
  6. $filename = $helper->getFilename(__FILE__);
  7. $writer = IOFactory::createWriter($spreadsheet, 'Xlsx');
  8. $writer->setIncludeCharts(true);
  9. $callStartTime = microtime(true);
  10. $writer->save($filename);
  11. $helper->logWrite($writer, $filename, $callStartTime);