
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
@flatfile/plugin-export-pivot-table
Advanced tools
A Flatfile plugin for generating pivot tables from sheet data and saving as Markdown documents
The @flatfile/plugin-export-pivot-table
plugin generates pivot tables from sheet data and saves them as Markdown documents within the Flatfile ecosystem. It provides a powerful way to analyze and summarize data directly within your Flatfile workbooks.
Event Type:
listener.on('job:ready', { job: 'workbook:generatePivotTable' })
When embedding Flatfile, this plugin should be deployed in a server-side listener. Learn more
pivotColumn
- string
The column to use as the pivot in the generated pivot table.
aggregateColumn
- string
The column to aggregate in the pivot table.
aggregationMethod
- 'sum' | 'average' | 'count' | 'min' | 'max'
The method to use for aggregating the data in the pivot table.
groupByColumn
- string
- (optional)An optional column to group by in the pivot table.
api.jobs.ack
api.jobs.complete
api.jobs.fail
api.sheets.list
api.records.get
api.documents.create
install
npm i @flatfile/plugin-export-pivot-table
import
import { pivotTablePlugin } from "@flatfile/plugin-export-pivot-table";
listener.js
listener.use(pivotTablePlugin({
pivotColumn: 'Region',
aggregateColumn: 'Sales',
aggregationMethod: 'sum',
groupByColumn: 'Category'
}));
listener.js
import { pivotTablePlugin } from "@flatfile/plugin-export-pivot-table";
export default function (listener) {
listener.use(pivotTablePlugin({
pivotColumn: 'Region',
aggregateColumn: 'Sales',
aggregationMethod: 'sum',
groupByColumn: 'Category'
}));
// rest of listener.js
}
The pivot table plugin performs the following steps:
This plugin enhances your Flatfile experience by providing powerful data analysis capabilities directly within your data import workflow.
The plugin generates a Markdown-formatted pivot table. Here's an example of what the output might look like:
# Pivot Table
- Pivot Column: Region
- Aggregate Column: Sales Amount
- Aggregation Method: sum
- Group By Column: Category
| Region | Electronics | Furniture | Total |
|--------|-------------|-----------|-------|
| North | 1750.00 | 480.00 | 2230.00 |
| South | 1820.00 | 280.00 | 2100.00 |
| East | 2050.00 | 460.00 | 2510.00 |
| West | 1320.00 | 200.00 | 1520.00 |
The table includes both grouped data (if a group-by column is provided) and totals for each pivot value. Values are formatted to two decimal places for readability.
FAQs
A Flatfile plugin for generating pivot tables from sheet data and saving as Markdown documents
The npm package @flatfile/plugin-export-pivot-table receives a total of 9 weekly downloads. As such, @flatfile/plugin-export-pivot-table popularity was classified as not popular.
We found that @flatfile/plugin-export-pivot-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.