Skip to content

Instantly share code, notes, and snippets.

@tmwatchanan
Created June 21, 2019 17:28
Show Gist options
  • Select an option

  • Save tmwatchanan/5d7217faa139830901ab08addfc99e10 to your computer and use it in GitHub Desktop.

Select an option

Save tmwatchanan/5d7217faa139830901ab08addfc99e10 to your computer and use it in GitHub Desktop.
An example from PhpSpreadsheet
<?php
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'Hello World !');
$writer = new Xlsx($spreadsheet);
$writer->save('hello world.xlsx');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment