Download the PHP package level51/silverstripe-excel-export without Composer
On this page you can find all versions of the php package level51/silverstripe-excel-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download level51/silverstripe-excel-export
More information about level51/silverstripe-excel-export
Files in level51/silverstripe-excel-export
Package silverstripe-excel-export
Short Description GridField button for excel exports
License MIT
Informations about the package silverstripe-excel-export
SilverStripe GridField button for excel exports
Similar to the default GridFieldExportButton but exports Excel (xlsx) files instead of CSV.
Compat
| 2.x | 1.x | 0.1.x |
|---|---|---|
| Silverstripe 5, php >= 8.1 | Silverstripe 4, php >= 7.1 | Silverstripe 3, php >= 7 |
Howto
Styling the exported xlsx file
You can hook in and style the ready-to-export Excel file with a callback function.
The callback passes a subclass of PhpOffice\PhpSpreadsheet\Writer\BaseWriter (e.g. Xlsx writer object), there you can get the spreadsheet and the worksheet and manipulate it. See PHPSpreadsheet docs fo more details.
Setting the default font
Draw borders around the exported data
and a thicker line between header and data
Style a specific column
Sometimes, e.g. telephone numbers are displayed as scientific number. In this case you need to format the content as text.
In this example we check the header row for a specific column named "Tel" and format each cell in this column explicitely as text.
Maintainer
- Daniel Kliemsch [email protected]
- Julian Scheuchenzuber [email protected]
All versions of silverstripe-excel-export with dependencies
silverstripe/framework Version ^5 | ^6
phpoffice/phpspreadsheet Version ^2 | ^3 | ^4 | ^5