solitus0 / dto-xlsx-generator
A lightweight Symfony bundle for generating XLSX files from typed DTOs.
Installs: 36
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/solitus0/dto-xlsx-generator
Requires
- php: >=8.1
- doctrine/common: ^3.5
- phpoffice/phpspreadsheet: ^5.0
- symfony/dependency-injection: ^5.4|^6.4|^7.0
- symfony/framework-bundle: ^5.4|^6.4|^7.0
- symfony/property-info: ^5.4|^6.4|^7.0
Requires (Dev)
- phpstan/phpstan: ^2.1.6
- phpstan/phpstan-phpunit: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^10.5
- spaze/phpstan-disallowed-calls: ^4.5
- symplify/easy-coding-standard: ^12.5
README
A lightweight Symfony bundle that converts attribute-decorated DTOs into fully populated XLSX spreadsheets using PhpSpreadsheet.
Features
- Attribute-first API: describe spreadsheet layouts directly on PHP DTOs.
- Inline and multi-sheet collection support with automatic parent-child linking.
Quick Start
composer require solitus0/dto-xlsx-generator
Register the bundle in config/bundles.php, add spreadsheet attributes to your DTOs, then inject Solitus0\DtoXlsxGenerator\Services\SpreadsheetGenerator to build workbooks. The full walk-through lives in the Generate Your First Spreadsheet tutorial.
Documentation (Diátaxis)
- Tutorial – learn the workflow end-to-end.
- How-to guides: model collections, validate DTOs, deliver XLSX files.
- Reference: attributes and services & configuration.