Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pivot subtotals loading #1223

Merged
merged 2 commits into from
Jun 13, 2019

Conversation

b0bi79
Copy link
Member

@b0bi79 b0bi79 commented May 29, 2019

ClosedXML does not correctly define the properties of subtotals for records, like this:

<pivotField showAll="0">
...
<dataField name="Sum Amount paid" fld="6" subtotal="sum" baseField="0" baseItem="0"/>

In this case, Excel shows subtotals, but after loading into ClosedXML and then saving the document, the subtotals are turned off.

@b0bi79
Copy link
Member Author

b0bi79 commented Jun 5, 2019

This PR is needed for the release of ClosedXML.Report

@igitur igitur added this to the v0.95 milestone Jun 5, 2019
@igitur igitur self-requested a review June 5, 2019 08:16
@igitur igitur added the bug label Jun 5, 2019
@Pankraty Pankraty added the .Report Issues affecting ClosedXML.Report project label Jun 5, 2019
@igitur
Copy link
Member

igitur commented Jun 10, 2019

Do you have a unit test for this?

@igitur
Copy link
Member

igitur commented Jun 11, 2019

I also notice that if I apply these commits on top of #1196 's branch, then it breaks #1196 's unit tests. The generated pivot table in TwoPivotWithOneSourceTest changes from not having subtotals to having subtotals. Not sure whether this intended.

@b0bi79
Copy link
Member Author

b0bi79 commented Jun 11, 2019

Today I can't, but tomorrow I will check and add new tests.

@igitur
Copy link
Member

igitur commented Jun 12, 2019

Please rebase this on develop. With #1196 now merged, I think that you will now already have a test case for this.

@igitur
Copy link
Member

igitur commented Jun 12, 2019

You should have rebased, not merged.

@b0bi79
Copy link
Member Author

b0bi79 commented Jun 12, 2019

I tried to rebase, but apparently did something wrong. How can I cancel this?

@igitur
Copy link
Member

igitur commented Jun 12, 2019

I'll do it and push to your branch a bit later. I don't want you to accidentally delete the work you've done.

@b0bi79
Copy link
Member Author

b0bi79 commented Jun 12, 2019

Sorry, I don't work well with git. Thank you.

@igitur igitur force-pushed the fix_pivot_subtotals_loading branch from ef61ffe to 42337e0 Compare June 12, 2019 13:23
@igitur
Copy link
Member

igitur commented Jun 12, 2019

image

This is how I rebased on develop.

@igitur
Copy link
Member

igitur commented Jun 12, 2019

Do a git pull origin/fix_pivot_subtotals_loading --rebase on your side.

@igitur
Copy link
Member

igitur commented Jun 13, 2019

Please unhide all sheets in the reference files. Hidden sheets add to confusion ;-)

@igitur
Copy link
Member

igitur commented Jun 13, 2019

Also try to simplify Sheet1 in order to keep the file as small as possible. For example, we don't need the image in the first row.

@igitur igitur force-pushed the fix_pivot_subtotals_loading branch from 2df27cb to 4aecf8c Compare June 13, 2019 14:08
@igitur
Copy link
Member

igitur commented Jun 13, 2019

I rewrote the commit history and pushed to your branch. If the CI tests pass, I will merge.

@igitur igitur merged commit 4fdc6d0 into ClosedXML:develop Jun 13, 2019
@igitur
Copy link
Member

igitur commented Jun 13, 2019

Thanks for the contribution. We're making good progress now.

@b0bi79 b0bi79 deleted the fix_pivot_subtotals_loading branch June 14, 2019 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug .Report Issues affecting ClosedXML.Report project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants