Skip to main content
The Excel Extractor plugin is designed to parse various Excel file formats (.xls, .xlsx, .xlsm, .xlsb, .xltx, .xltm) and extract structured data from them. When a user uploads a supported Excel file, this plugin automatically processes it, detects headers, and transforms the sheet data into a format that Flatfile can use. It offers extensive configuration for handling complex Excel files, including options for header detection, processing merged cells, and cascading data in hierarchical spreadsheets. This plugin is intended to be used in a server-side listener within the Flatfile platform.

Installation

Install the Excel Extractor plugin using npm:

Configuration & Parameters

The Excel Extractor accepts the following configuration options:

Basic Options

Advanced Options

Header Detection Options

Default configuration:
Available algorithms:
  • 'default' - Scans first 10 rows and selects the one with most non-empty cells
  • 'explicitHeaders' - Use when headers are explicitly defined
  • 'specificRows' - Define specific row numbers as headers
  • 'dataRowAndSubHeaderDetection' - Advanced detection for complex header structures

Merged Cell Options

Configure treatment of merged cells with these options:

Usage Examples

Configuration Example

Advanced Header Detection

Merged Cell Handling

Direct Parser Usage

Troubleshooting

Large File Handling

Debug Mode

Enable debug mode for detailed logging:
This provides detailed logs about the extraction process, including detected headers, rows processed, and configuration options being applied.

Notes

Default Behavior

  • Header Detection: By default, the plugin scans the first 10 rows and selects the one with the most non-empty cells as the header row
  • Empty Rows: Empty rows are included as empty records unless skipEmptyLines is set to true
  • Merged Cells: Handled by the underlying library’s default behavior unless custom options are provided
  • Chunk Processing: Data is processed in batches of 10,000 records by default

Important Considerations

  • Server-Side Only: This plugin is designed to run in a server-side environment and should be used within a Flatfile listener
  • Duplicate Headers: If a sheet contains duplicate column headers, the plugin automatically makes them unique by appending a suffix (e.g., ‘Name’, ‘Name_1’, ‘Name_2’)
  • Empty Headers: Empty header cells are renamed to ‘empty’ (e.g., ‘empty’, ‘empty_1’)
  • Trailing Empty Rows: The parser automatically trims any fully empty rows from the end of a sheet before processing
  • Memory Limitations: The plugin has built-in handling for extremely large files that can cause memory issues, throwing a user-friendly error when files are too large

Cascading Behavior

  • Row Cascading: When cascadeRowValues is enabled, empty cells are filled with values from the cell above. The cascade resets on a completely blank row or a new value in the column
  • Header Cascading: When cascadeHeaderValues is enabled, empty header cells are filled with values from the cell to the left. The cascade resets on a blank column or a new value