<?php
require __DIR__ . '/vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'OrderID');
$sheet->setCellValue('B1', 'ItemCode');
$sheet->setCellValue('C1', 'Quantity');
$sheet->setCellValue('D1', 'PO_Date');
$sheet->setCellValue('A2', 123456);
$sheet->setCellValue('B2', 'TEST_XLSX');
$sheet->setCellValue('C2', 2);
$sheet->setCellValue('D2', '2026-04-09');
$writer = new Xlsx($spreadsheet);
$path = __DIR__ . '/tmp_import_orders.xlsx';
$writer->save($path);
echo $path . PHP_EOL;
