Rowpine for TanStack Table
Buy a license
DocsExcel

Tree data

Updated November 13, 2026rowpine 1.0.3
Edit on GitHub
An org chart table with expandable units, leads, headcount and budgets
An org chart table with expandable units, leads, headcount and budgets.

Rows nested with getSubRows export with their hierarchy.

ts
const table = useTable({
  features,
  columns,
  data: org,
  getSubRows: (unit) => unit.subRows,
  initialState: { expanded: true },
})

Every row is exported, expanded or not, in tree order: a parent, then its children, then the next parent. In Excel each depth is an outline level, and in the PDF the first column is indented by depth.

Parent rows are bold in both files. Their values are whatever your data holds for them; Rowpine does not add formulas to tree rows, because a parent's number is not always the sum of its children.

Live example and sourceRun this in the browser and read the code behind it.Open →