glhd / linen
Installs: 8 615
Dependents: 0
Suggesters: 0
Security: 0
Stars: 190
Watchers: 2
Forks: 3
Open Issues: 0
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');