# Pivot Foundation

`spread.data.pivot.create` creates a new Pivot sheet from the current selection.

Current rule set:

- First selected row is treated as a header row.
- First selected column is the row field.
- Remaining columns are value fields.
- Numeric values are aggregated with SUM.
- A Grand Total row is generated.
- Pivot metadata is stored under the source sheet's `config.pivots[]`.

This is intentionally a frontend-native pivot model first.  XLSX pivot-cache compatibility is deferred because it requires a large OOXML-specific writer and should not destabilize normal workbook editing.
