Skip to content

Commit

Permalink
Merge pull request #102 from dakira/fix/missing-documentation
Browse files Browse the repository at this point in the history
Documentation for fromSheet and headerOnRow
  • Loading branch information
freekmurze authored Aug 30, 2022
2 parents 023e3cb + b8a6e97 commit d6efad3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ $rows = SimpleExcelReader::create($pathToCsv)
});
```

### Working with multiple sheet documents

Excel files can include multiple spreadsheets. You can select the sheet you want to use with the `fromSheet()` method.

```php
$rows = SimpleExcelReader::create($pathToXlsx)
->fromSheet(3)
->getRows();
```

#### Retrieving Header Row values

If you would like to retrieve the header row as an array, you can use the `getHeaders()` method.
Expand Down Expand Up @@ -144,7 +154,7 @@ jane@example.com,jane
// $rows is an instance of Illuminate\Support\LazyCollection
$rows = SimpleExcelReader::create($pathToCsv)
->trimHeaderRow()
->setHeaderRow(3)
->headerOnRow(3)
->getRows()
->each(function(array $rowProperties) {
// in the first pass $rowProperties will contain
Expand Down

0 comments on commit d6efad3

Please sign in to comment.