The @flatfile/plugin-export-workbook
plugin exports data in a Flatfile Workbook to a downloadable .xlsx
file.
Event Type:
listener.on('job:ready')
Supported file types:
.xlsx
When embedding Flatfile, this plugin should be deployed in a server-side listener. Learn more
The name of job that the plugin will fire on. If not provided, workbook:downloadWorkbook
will be used.
An array of sheets to be excluded from the export
An array of fields to be excluded from the export
Allows filtering exported records to valid
or error
. By default all records will be exported
Includes the record's ID
Automatically download the file after exporting
The debug
parameter lets you toggle on/off helpful debugging messages for development purposes.
An action with the operation name of "downloadWorkbook" must be configured on a Workbook (not a Sheet) in order for the plugin to be triggered.
// ... inside Workbook configuration
"actions": [
{
"operation": "downloadWorkbook",
"mode": "foreground",
"label": "Download Excel Workbook",
"description": "Downloads Excel Workbook of Data",
"primary": true
}
]
// ...
npm i @flatfile/plugin-export-workbook
import type { FlatfileListener } from "@flatfile/listener";
import { exportWorkbookPlugin } from "@flatfile/plugin-export-workbook";
export default function (listener: FlatfileListener) {
listener.use(exportWorkbookPlugin());
}