rightToLeft()
XLSX exports can now open as proper right-to-left sheets. Column order, scroll direction and the grid all run right to left, which is what Arabic business documents expect.
(new FastExcel($report))->rightToLeft()->export('report.xlsx');Multi-sheet exports are covered too: every sheet in a SheetCollection gets the setting, not just the first. Pass rightToLeft(false) to turn it back off. CSV and ODS ignore it, since neither format has an equivalent.
Thanks to @moemadeldin for this one. He opened #420 explaining why configureWriterUsing() couldn't reach the setting (the sheet doesn't exist yet when that hook runs), then sent #421 with the fix and tests covering both the single-sheet and multi-sheet paths. The issue write-up did half the work.
withSheetContext()
importSheets() can now pass the sheet name to your callback, so the same field names can be treated differently depending on which sheet they came from.
$sheets = (new FastExcel)
->withSheetContext()
->importSheets('file.xlsx', function ($sheetName, $row) {
return $row + ['_sheet' => $sheetName];
});Requested in #369 by @StarkOne, whose earlier patch shaped the final version.
Full changelog: v5.14.0...v5.15.0