PivotTables: leave the grand-total mapping to #1882

The rowGrandTotals/colGrandTotals fix moved to its own PR at review's request.
This commit is contained in:
Neil Cawse
2026-10-18 19:16:42 +00:00
parent ec3666f913
commit df97bf8445
2 changed files with 5 additions and 7 deletions
+4 -6
View File
@@ -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<Pivo
.map_or_else(|| field_subtotals(f), |v| v == "1" || v.eq_ignore_ascii_case("true"));
pt.subtotals_top = f.flag("subtotalTop", true);
}
pt.grand_totals_rows = x.flag("colGrandTotals", true);
pt.grand_totals_cols = x.flag("rowGrandTotals", true);
pt.grand_totals_rows = x.flag("rowGrandTotals", true);
pt.grand_totals_cols = x.flag("colGrandTotals", true);
pt.show_headers = x.flag("showHeaders", true);
pt.style = x.child("pivotTableStyleInfo").and_then(|s| s.attr("name")).unwrap_or("").to_string();
let caption = |a: &str| x.attr(a).filter(|c| !c.is_empty()).map(str::to_string);
+1 -1
View File
@@ -339,7 +339,7 @@ The inventory carried over from the 2026-10-07 ROADMAP.md, updated for what land
| 2026-10-11 | minor | Password-encrypted workbooks open (#11): Essentials file-opening work 24–36 h |
| 2026-10-11 | minor | Worksheet functions 505 / 523 (96.6%; 496 working): ODDFPRICE, ODDFYIELD, ODDLPRICE, ODDLYIELD |
| 2026-10-11 | minor | Worksheet functions 503 / 523 (96.2%; 494 working): PERCENTOF, EUROCONVERT |
| 2026-10-13 | minor | PivotTables: sort by a value field (`pivot.sort by:`), row/column/data/grand-total/empty-cell captions, field and item custom names, manual item order, per-field subtotals and number formats, Repeat Item Labels, Values row, classic layout; `rowGrandTotals`/`colGrandTotals` read the right way round. Refreshing 26 PivotTables from 11 real workbooks: 7,229 → 3,323 cell differences against Excel's saved output, the rest filters (#498) and Excel's order among tied values |
| 2026-10-13 | minor | PivotTables: sort by a value field (`pivot.sort by:`), row/column/data/grand-total/empty-cell captions, field and item custom names, manual item order, per-field subtotals and number formats, Repeat Item Labels, Values row, classic layout. Refreshing 26 PivotTables from 11 real workbooks: 7,271 → 3,446 cell differences against Excel's saved output, the rest filters (#498) and Excel's order among tied values |
| 2026-10-11 | minor | Worksheet functions 502 / 523 (96.0%; 493 working): BAHTTEXT |
| 2026-10-11 | minor | Worksheet functions 502 / 523 (96.0%; 493 working): TRIMRANGE |
| 2026-10-11 | minor | View › Formula Bar and Zoom 100% are engine commands (CLI/MCP); catalog 258 → 260 / 290 (#289) |