Add editable charts to XLSX reports in pure PHP: quarterly line charts, pie charts, column-and-line combos, and a secondary axis. FastExcelWriter 6.17 examples include a four-chart dashboard.
Turn a raw XLSX export into a useful sales report with FastExcelWriter: style headers and data, set number formats and column widths, freeze headers, add filters, and build a summary sheet.
"The Excel file downloads but is corrupted" almost always means stray bytes around the ZIP. Here is how to send an XLSX to the browser properly: download()/output(), the reference headers, and recipes for Laravel and Symfony controllers.
Streaming export with cursor() keeps memory flat, but touching a model's relations inside the export triggers N+1 — thousands of extra queries. Here is why cursor() cannot help with relations and how to export them through lazy() without giving up the memory savings.
Does importing a large Excel file kill PHP on memory? Here is why the workbook object model is doomed to OOM, and how to read a million-row XLSX with flat memory use — on XMLReader and generators in FastExcelReader.
Dates turn into 44898, leading zeros vanish from SKUs, card numbers become 8.98E+18. Those are not bugs — that is how Excel stores values. Learn to type your data correctly when exporting to XLSX with FastExcelWriter.
Word has mail merge: you take a template with fields and drop the data in. Excel appears to have nothing of the sort out of the box — so developers start assembling documents cell by cell in code. In fact, substituting values into a ready XLSX takes two lines: placeholders, the fill/replace difference, and the usual traps.
Importing Excel into Eloquent models usually turns into a loop that picks cells apart by hand. Here is how withHeadings() and mapping() cut it down to a few lines, and how to bind “foreign” columns of a file to your model's attributes without guesswork.
Does your Excel export die with an out-of-memory error on large data? The cause is the “whole workbook in memory” object model. Here is how to write a million rows to XLSX with flat memory use in plain PHP: FastExcelWriter's row → temp file → ZIP streaming scheme.
The accountant has already drawn the invoice form in Excel — with a logo, borders, number formats, and formulas. There is no need to reproduce that in code: FastExcelTemplator takes the ready XLSX as a template, substitutes data for the placeholders, and repeats table rows while keeping the formatting.