Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completed instructions to use gatsby-transformer-excel #4852

Merged
merged 2 commits into from
Apr 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion packages/gatsby-transformer-excel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,30 @@ Parses Excel files into JSON arrays.

`npm install --save gatsby-transformer-excel`

Note: You generally will use this plugin together with the [`gatsby-source-filesystem`](/packages/gatsby-source-filesystem/) plugin. `gatsby-source-filesystem` reads in the files then this plugin *transforms* the files into data you can query.

## How to use

If you put your Excel's files in `./src/data`:

```javascript
// In your gatsby-config.js
plugins: [`gatsby-transformer-excel`];
module.exports = {
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: `data`,
path: `${__dirname}/src/data/`,
},
},
`gatsby-transformer-excel`,
],
}
```

You can see an example project at https://github.com/gatsbyjs/gatsby/tree/master/examples/using-excel.

## Parsing algorithm

The parsing is powered by the [SheetJS / js-xlsx](https://git.io/xlsx) library.
Expand Down