酒店预订平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
539 B

  1. <?php
  2. use PhpOffice\PhpSpreadsheet\IOFactory;
  3. use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
  4. require __DIR__ . '/../Header.php';
  5. // Create temporary file that will be read
  6. $sampleSpreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';
  7. $filename = $helper->getTemporaryFilename();
  8. $writer = new Xlsx($sampleSpreadsheet);
  9. $writer->save($filename);
  10. $callStartTime = microtime(true);
  11. $spreadsheet = IOFactory::load($filename);
  12. $helper->logRead('Xlsx', $filename, $callStartTime);
  13. // Save
  14. $helper->write($spreadsheet, __FILE__);