Rowpine for TanStack Table
Buy a license
DocsGetting started

Export from your own buttons

Updated November 13, 2026rowpine 1.0.3
Edit on GitHub
A toolbar with page size, landscape and a Download PDF button above a grouped table
A toolbar with page size, landscape and a Download PDF button above a grouped table.

The export menu is optional. Call the export functions from any button, a keyboard shortcut or a scheduled job in the browser.

ts
import { exportCsv, exportPdf, exportXlsx } from "rowpine"

await exportXlsx(table, { fileName: "orders" })
await exportPdf(table, { fileName: "orders", title: "Orders", pageOrientation: "landscape" })
await exportCsv(table, { fileName: "orders" })

Each returns the file as a Blob and, by default, saves it in the browser. Pass download: false to keep the Blob, for example to upload it or attach it to an email:

ts
const blob = await exportXlsx(table, { download: false })
await fetch("/api/reports", { method: "POST", body: blob })

Options shared by all three:

Option What it does
fileName File name; the extension is added.
rows "all" (default), "page" or "selected". See which rows are exported.
rowStyle (original) => ({ fill, color, bold }) for whole rows.
download Save the file. Default true.
Live example and sourceRun this in the browser and read the code behind it.Open →