Fix PivotTable page header location

This commit is contained in:
Neil Cawse
2026-10-22 05:11:53 +00:00
parent 2b297cd194
commit 32b2bbe471
+3 -3
View File
@@ -908,9 +908,9 @@ fn table_xml(pt: &PivotTable, idx: usize, cache_id: u32, c: &Cache, fmt_id: &dyn
} else {
row_levels.max(1)
};
// Two or more value fields in Columns alone: Excel 365 would add a `Values` caption row
// when field headers are shown.
let hide_values_row = col_values.is_some() && col_idx.is_empty() && pt.show_headers;
// Two or more value fields in Columns alone: Excel 365 adds a `Values` caption row
// when field headers are shown. Page-filter layouts retain their classic header row.
let hide_values_row = col_values.is_some() && col_idx.is_empty() && pages.is_empty() && pt.show_headers;
let first_header_row = usize::from(!hide_values_row);
let _ = write!(
s,