diff --git a/packages/gatsby-transformer-excel/README.md b/packages/gatsby-transformer-excel/README.md index bc9b008b430cf..03dd71f3e7ac8 100644 --- a/packages/gatsby-transformer-excel/README.md +++ b/packages/gatsby-transformer-excel/README.md @@ -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.