Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Jul 25, 2024
1 parent 0ab8dbd commit d01fbc5
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</a>
<a href="https://codeclimate.com/github/glhd/linen/test_coverage" target="_blank">
<img
src="https://api.codeclimate.com/v1/badges/change-me/test_coverage"
src="https://api.codeclimate.com/v1/badges/1147f60db6ef22057dbc/test_coverage"
alt="Coverage Status"
/>
</a>
Expand All @@ -31,8 +31,30 @@
</a>
</div>

# linen
# Linen

Linen is a lightweight spreadsheet utility for Laravel. It's a simple wrapper for
[openspout](https://github.com/openspout/openspout) with some data normalization conveniences.

## Installation

```shell
composer require glhd/linen
```

## Usage

To read a spreadsheet:

```php
foreach (Linen::read('path/to/your.xlsx') as $row) {
// $row is a collection, keyed by the headers in snake_case
}
```

To write a spreadsheet:

```php
// $data can be any iterable/Enumerable/etc
$path = Linen::write($data, 'path/to/your.xlsx');
```

0 comments on commit d01fbc5

Please sign in to comment.