hellofresh / ausraster
A set of adapters for document manipulation.
Installs: 32 001
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 232
Forks: 2
Open Issues: 6
Requires
- php: >=7.0
- easyframework/collections: ^6.0
Requires (Dev)
- phpunit/phpunit: ^5.4
Suggests
- phpoffice/phpexcel: Required to use the PHPExcel adapter
This package is not auto-updated.
Last update: 2024-03-02 16:21:48 UTC
README
Ausraster
Working with spreadsheets can make you (╯°□°)╯︵ ┻━┻. Ausraster puts a stop to that frustration, by providing a unified, sane interface over various document libraries.
┳━┳ ノ( ゜-゜ノ)
Features and Roadmap
- Excel adapter (provided by PHPExcel)
- Fully PSR-2 compliant
- Composer / PSR-4 compliant
- Test coverage
- Cell formatting
- CSV adapter
- Other adapters to come! Need an adapter? Feel free to contribute!
Usage
Installation
$ composer require hellofresh/ausraster
Bring Your Own Adapter
By itself, Ausraster doesn't do much, as it needs another library to act as an interface to. For example, we can make use of Ausraster's Spreadsheet interfaces if we include PHPExcel:
$ composer require phpoffice/phpexcel
No matter what spreadsheet adapter you use, Ausraster is designed to have the same simple, friendly interface.
require_once 'vendor/autoload.php'; use HelloFresh\Ausraster\Spreadsheet\Coordinate; use HelloFresh\Ausraster\Spreadsheet\PhpExcel\Document; $document = new Document; $worksheet = $document->createWorksheet(); $coordinate = new Coordinate('A', 1); $cell = $worksheet->getCellAt($coordinate); $cell->fill('Ausraster rules!'); $document->save('example.xlsx');
To see more, check out the examples folder.
Contributing
Thinking of adding an adapter or fixing a bug? Thanks! Please see CONTRIBUTING.md before doing so to familiarise yourself with the review process, code of conduct, etc.