Class LaravelUi5\Sdk\Export\CsvExportWriter

implements ExportWriterInterface

The SDK's native, zero-dependency CSV writer — plain fputcsv to php://output inside a {@see StreamedResponse}, so memory stays flat over the Exportable's row generator no matter the row count.

Three things make the file open cleanly in Excel across the SME estate:

  • a UTF-8 BOM so Excel reads accented characters correctly;
  • a ; delimiter by default — German Excel's list separator (override via the constructor for ,-locale hosts);
  • a formula-injection guard — any cell whose first character is = + - @ (or a control char) is prefixed with ', so a value like =CMD() can't be evaluated as a formula on open (OWASP CSV-injection mitigation).

fputcsv is called with escape: '' — the RFC-4180-correct behaviour and the PHP 8.4+ default direction (the legacy backslash escape is deprecated).

Methods