I have another problem with pivot tables.
I would like to merge labels from code.
The problem is that I set property MergeLabels = true and then refresh data but after save xlsx file changes are not visible.
In Excel, in pivot table options is properly checked option about merge label.
I checked, and after save to xlsx file properties are saved but changes are not visible.
I attached example file xlsx. After open - labels aren't merged, but after click "Refresh" on pivot then it works! Without any other settings.
pivot.MergeLabels = true; pivot.RefreshDataFlag = true; pivot.RefreshData(); pivot.CalculateData(); pivot.CalculateRange(); pivot.RefreshDataFlag = false;
So - I don't know - the problem is in my way of refreshing pivot or other problem?