- Can I use onurb/excel-bundle in a Laravel application?
- Not directly. It is a Symfony bundle, and Laravel has no bundle registration mechanism, so the abstraction adds no value on its own. The underlying phpoffice/phpspreadsheet library is framework-agnostic and installs cleanly via Composer, so depend on that instead. Porting the bundle's services into a Laravel service provider is possible but rarely worth the maintenance.
- Does onurb/excel-bundle support Laravel 10 or 11?
- No. The package targets Symfony and ships no Laravel service provider, facade, or publishable config. Its Symfony component constraints can also conflict with the symfony/* versions Laravel pins transitively. Use phpoffice/phpspreadsheet or maatwebsite/excel in a Laravel codebase.
- How do I install onurb/excel-bundle?
- In Symfony you run composer require onurb/excel-bundle and register the bundle in config/bundles.php. There is no equivalent step in Laravel, which is exactly why it is a poor fit. If you only need spreadsheet IO, composer require phpoffice/phpspreadsheet is the smaller and correct dependency.
- What is the difference between onurb/excel-bundle and maatwebsite/excel?
- onurb/excel-bundle is a thin Symfony DI wrapper around PhpSpreadsheet with handlers for XLSX, ODS, CSV, PDF, and HTML. maatwebsite/excel is Laravel-native and adds model import/export, chunked reading, queued exports, and a much larger ecosystem. For conventional Laravel import and export workloads, maatwebsite/excel is the idiomatic choice.
- Which file formats does onurb/excel-bundle support?
- It packages handlers for XLSX, ODS, CSV, PDF, and HTML through PhpSpreadsheet. Treat the marketing claims carefully: PDF writing depends on an external renderer such as Dompdf or mpdf and is quality-limited, and ODS support is read-oriented and lossy versus native tooling. Validate fixtures for whichever formats you actually need.
- Is onurb/excel-bundle actively maintained?
- It has one maintainer, roughly 13 GitHub stars, and no downstream dependents, which is a weak production-hardening signal. Adopting it in Laravel means you effectively become the maintainer of a fork. Prefer depending on PhpSpreadsheet directly so you control the version and can take security patches promptly.
- How do I export data to XLSX in a Laravel app?
- Use phpoffice/phpspreadsheet behind a small internal SpreadsheetService of roughly 100 to 200 lines that handles format detection, IO, and temp files, or use maatwebsite/excel if you are exporting Eloquent models. Write to a temp path and stream the response, and push large exports onto a queue. Avoid loading many workbooks concurrently because PhpSpreadsheet holds the entire workbook in memory.
- Can PhpSpreadsheet handle large Excel files in Laravel?
- PhpSpreadsheet loads workbooks into memory, so large XLSX files are a known operational hazard regardless of which wrapper you use. Use read filters and chunked reads, run imports and exports in queued jobs, and set explicit memory limits. Decide your file-size and concurrency envelope before you build the feature.
- How do I handle untrusted spreadsheet uploads safely?
- Treat uploads as untrusted input: validate extension and MIME type, cap file size, disable external entity loading to reduce XXE risk, and guard against zip-bomb style payloads. Also watch for CSV formula injection when re-exporting user-supplied cells, prefixing values that begin with =, +, -, or @. PhpSpreadsheet has historically carried issues in these classes, so track its security releases closely.
- Can I port onurb/excel-bundle's services into a Laravel service provider?
- Technically yes. Its service definitions are simple and mostly wire readers, writers, and format handlers into the container. But you would be re-hosting a low-star, single-maintainer artifact that upstream may abandon. Only do it if a specific handler such as ODS or PDF writer configuration justifies the cost, and copy the classes under your own namespace with MIT attribution and a pinned PhpSpreadsheet version.