The Flatfile Developer Hub

Welcome to the Flatfile developer hub. You'll find comprehensive guides and documentation to help you start working with Flatfile as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Installation

License Key

In order to setup, you need to create or sign in to your account and obtain a license key.

Quickstart

Add the following code before the ending </body> tag in your html.

<button onclick="importer.open()">Import Data</button>

<script src="https://unpkg.com/flatfile-csv-importer/build/dist/index.min.js"></script>

<script>
  var LICENSE_KEY = 'PASTE YOUR KEY HERE'
  
  // example config, read the configuration docs to learn more
  var importer = new FlatfileImporter(LICENSE_KEY, {
    fields: [
      {
        label: 'Field 1',
        key: 'field1'
      },
      {
        label: 'Field 2',
        key: 'field2'
      }
    ]
  })
  
  importer.requestDataFromUser().then(function(results) {
    console.log(results.data)
    // do something with the clean data here like upload it to your server
  }, function() {
    // do something if the user closes the importer
  })
</script>

Using NPM or Bower

If you don't like external dependencies, or you have a nice build system like Webpack in place. You can install and use Flatfile as an npm package.

npm install flatfile-csv-importer --save

or

bower install flatfile-csv-importer --save

What's Next

Learn more about configuring and using Flatfile in your application.

Simple Usage
ES6 / Babel Usage

Installation