glhd / linen
Installs: 7 209
Dependents: 0
Suggesters: 0
Security: 0
Stars: 188
Watchers: 1
Forks: 3
Open Issues: 2
Requires
- ext-json: *
- illuminate/support: ^10|^11|dev-master
- openspout/openspout: ^4.24
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.34
- mockery/mockery: ^1.6
- orchestra/testbench: ^8|^9|10.x-dev|dev-master
- phpunit/phpunit: ^10.5
README
Linen is a lightweight spreadsheet utility for Laravel. It's a simple wrapper for openspout with some data normalization conveniences.
Installation
composer require glhd/linen
Usage
To read a spreadsheet:
foreach (Linen::read('path/to/your.xlsx') as $row) { // $row is a collection, keyed by the headers in snake_case }
To write a spreadsheet:
// $data can be any iterable/Enumerable/etc $path = Linen::write($data, 'path/to/your.xlsx');