Skip to content

Latest commit

 

History

History
56 lines (47 loc) · 1.37 KB

File metadata and controls

56 lines (47 loc) · 1.37 KB

Linen

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');