Skip to content

Commit

Permalink
Merge pull request #2 from bureson/master
Browse files Browse the repository at this point in the history
Fix for sheets with header only
  • Loading branch information
larsthorup committed Aug 17, 2018
2 parents 0a3372c + 30c26a6 commit 01cd6c6
Show file tree
Hide file tree
Showing 6 changed files with 2,806 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [when created from object](#sheet-reader-when-created-from-object)
- [error handling](#sheet-reader-error-handling)
- [outrageous range in sheet](#sheet-reader-error-handling-outrageous-range-in-sheet)
- [files with header only](#sheet-reader-files-with-header-only)
<a name=""></a>

<a name="sheet-reader"></a>
Expand Down Expand Up @@ -253,3 +254,12 @@ this.timeout(30000); // Note: the xlsx module takes a long time to parse this sm
(() => sheetReader.readFile('test/data/bad.xlsx')).should.throw('Sheet "content" has a much larger range "A1:L1048576" than the row count of "2"');
```

<a name="sheet-reader-files-with-header-only"></a>
## files with header only
should do just fine.

```js
const file = sheetReader.readFile('test/data/worse.xlsx', {trim: true});
file.should.deep.equal({content: {}});
```

0 comments on commit 01cd6c6

Please sign in to comment.