Extractors
@flatfile/plugin-xlsx-extractor

Overview

This plugin parses all Sheets in an XLSX file and extracts them into Flatfile.

INSTALL
npm i @flatfile/plugin-xlsx-extractor


Import

npm i @flatfile/plugin-xlsx-extractor
import { ExcelExtractor } from '@flatfile/plugin-xlsx-extractor'

Usage

Listen for an XLSX file to be uploaded to Flatfile. The platform will then extract the file automatically. Once complete, the file will be ready for import in the Files area.

listener.on(['file:created'], (event) => {
  return new ExcelExtractor(event).runExtraction()
})

Additional Options

The extractor can accept additional properties. Props will be passed along to the Sheet.js parsing engine.

listener.on(['file:created'], (event) => {
  return new ExcelExtractor(event, { rawNumbers: true }).runExtraction()
})

Properties

rawNumbersoptional
boolean

In Excel, you could have rounding or formatting on a number cell to only display say 2 decimal places. By default, Flatfile will just take the displayed decimal places versus the raw numbers. Set this value to true to take the raw numbers and disregard how it’s displayed in Excel.