Fix #352 — Pivot table corruption, sheetFormatPr/pageMargins defaults, workbook namespaces - #354
Merged
MathNya merged 3 commits intoAug 14, 2026
Conversation
1. Issue 1 (High): Pivot table infrastructure silently dropped on write 2. Issue 2 (High): Empty sheetFormatPr from minimal template sheets causes Excel XML error 3. Issue 3 (Medium): calcChain.xml left stale after sheet modifications 4. Issue 4 (Low): Workbook namespace declarations stripped 5. Issue 5 (Medium): refreshOnLoad attribute on pivotTableDefinition is not preserved 6. Issue 6 (Medium): missingItemsLimit attribute on pivotField element is not preserved.
Contributor
|
Never mind, I saw the comment in the code. Hadn't looked at the code yet. |
c-git
reviewed
Aug 5, 2026
|
|
||
| #[inline] | ||
| #[must_use] | ||
| #[deprecated(since = "3.0.0", note = "Use xr_uid()")] |
Contributor
There was a problem hiding this comment.
Why are you adding deprecated functions?
c-git
reviewed
Aug 5, 2026
| #[must_use] | ||
| pub fn member_property_index(&self) -> Option<&MemberPropertyIndex> { | ||
| self.member_property_index.as_ref() | ||
| pub fn member_property_indices(&self) -> &[MemberPropertyIndex] { |
Contributor
There was a problem hiding this comment.
Isn't this a breaking change?
Contributor
There was a problem hiding this comment.
I guess the whole point is to change it to a list but from reading the PR description I wasn't aware it contained breaking changes.
Removed deprecated getter methods for various properties in pivot_table_definition.
…-compat member_property_index() on RowItem
Owner
|
@yoonghm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #352
Issues fixed
Pivot table infrastructure silently dropped on write — Added
rowGrandTotals,colGrandTotals,compactData,xr:uid, andrefreshOnLoadattributes toPivotTableDefinition. FixedRowItemto support multiple<x/>children (one per row field). Added pivot cache records preservation through the reader→writer pipeline.Empty
sheetFormatPrfrom minimal template sheets — Writer now always emitsdefaultRowHeight(default: 14.25) andx14ac:dyDescent(default: 0.45) even when the template didn't supply them.Zero
pageMarginsfrom minimal templates — Writer now replaces all-zero margins with sensible defaults (left=0.7, right=0.7, top=0.75, bottom=0.75, header=0.3, footer=0.3).Workbook namespace declarations stripped — Writer now emits the standard Excel namespace set:
xmlns:mc,xmlns:x15,xmlns:xr,xmlns:xr2,xmlns:xr6,xmlns:xr10,mc:Ignorable.Stale
calcChain.xml— Verified: calcChain is never written (Excel regenerates it on open).missingItemsLimitonpivotField— Added read/write support for themissingItemsLimitattribute (0 = None, no limit on retained items per field).Files changed (13)
src/helper/const_str.rssrc/reader/xlsx.rssrc/reader/xlsx/pivot_cache.rssrc/reader/xlsx/pivot_table.rssrc/structs/page_margins.rssrc/structs/pivot_cache_definition.rssrc/structs/pivot_field.rssrc/structs/pivot_table_definition.rssrc/structs/row_item.rssrc/structs/sheet_format_properties.rssrc/structs/writer_manager.rssrc/writer/xlsx/pivot_cache.rssrc/writer/xlsx/workbook.rs