Download the PHP package kriss/data-export without Composer
On this page you can find all versions of the php package kriss/data-export. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kriss/data-export
More information about kriss/data-export
Files in kriss/data-export
Package data-export
Short Description Data Export For PHP
License MIT
Homepage https://github.com/krissss/php-data-export
Informations about the package data-export
Data Export For PHP
Wrap sonata-project/exporter, make it easy and strong~
Feature
- Simple api (use
DataExporter::csv()->saveAs()
) - Quick change for different output type (csv/xlsx/xls/ods...)
- Support a lot of source, and can use array or iterator quickly
- Low memory usage with huge data write (use csv/xlsxSpout)
- Low memory usage with chunk data fetch and write by chain (use GeneratorChainSourceIterator)
- Support
saveAs()
andbrowserDownload()
- Support do something in writing (use ObjectEvent)
- Support control Spreadsheet and Spout Instance, for change style and others (use Extend)
- Support Excel multi sheet write (use ExcelSheetSourceIterator)
- Support Dynamic source (use CallableSourceIterator)
Installation
You can install the package via composer:
Usage
simple Example
Support Source
- all source defined in sonata-project/exporter
- Simple source, Example in Tests
- GeneratorChainSourceIterator, Example in Tests
- ExcelSheetSourceIterator, Example in Tests
- CallableSourceIterator, Example in Tests
Support Writer
All Config in DataExporter::writerConfig()
, see Tests
You can extend DataExporter and add Yours, see Example in Tests
FAQ
Why box/spout Use
box/spout
can write xlsx use stream, but phpoffice/phpspreadsheet
not.
phpoffice/phpspreadsheet
use lots of memory when write huge data, but box/spout
use few!
When use
GeneratorChainSourceIterator
When you should handle huge source and need to merge them in one write.
How to build style
Use extension, see ExtendSpreadsheetTest
How to write multi sheet
Use ExcelSheetSpreadsheetTrait, see ExcelSheetSourceIteratorTest
All versions of data-export with dependencies
illuminate/container Version >=9
sonata-project/exporter Version ^3.3
symfony/filesystem Version >=5.4