diff --git a/crates/xlsx/src/pivot.rs b/crates/xlsx/src/pivot.rs index 6ffba2fb5..77bee3008 100644 --- a/crates/xlsx/src/pivot.rs +++ b/crates/xlsx/src/pivot.rs @@ -864,12 +864,10 @@ fn table_xml(pt: &PivotTable, idx: usize, cache_id: u32, c: &Cache, fmt_id: &dyn if !pt.show_headers { s.push_str(" showHeaders=\"0\""); } - // `rowGrandTotals` is the grand total row below the report (Excel's "On for Columns"), - // `colGrandTotals` the grand total column at its right ("On for Rows"). - if !pt.grand_totals_cols { + if !pt.grand_totals_rows { s.push_str(" rowGrandTotals=\"0\""); } - if !pt.grand_totals_rows { + if !pt.grand_totals_cols { s.push_str(" colGrandTotals=\"0\""); } s.push_str(" multipleFieldFilters=\"0\""); @@ -1439,8 +1437,8 @@ fn read_table(cx: &mut Ctx<'_>, x: &El, cache: &CacheIn, id: u32) -> Option