Skip to main content

getpivotdata

Function getpivotdata 

Source
pub fn getpivotdata(
    sheets: &[&Sheet],
    pivot: &PivotTable,
    data_field: &str,
    criteria: &[(String, String)],
) -> Result<ResultData, String>
Expand description

Implements GETPIVOTDATA: extracts a single summarized value out of a pivot table’s computed grid by data-field name plus (row/col field, item) criteria pairs, the same way real Excel’s formula does when pointed at a rendered pivot. Recomputes the grid fresh from sheets rather than caching it, consistent with formulas re-evaluating from current sheet state on every recalculation pass.