Hi Amjad,
Thanks for your reply!
I looked into this issue and find it is actually a new issue. The template file is attached.
Now, we can read the pivot table style from xls without any problem which solve the issue I reported. Thanks for the great effort on this again!
If you take a look at the pivot table in worksheet "Average" of the template file, you will see it is identical except for the style. I used the following code to try setting the style:
targetPivot.PivotTableStyleName = srcPivot.PivotTableStyleName;
targetPivot.PivotTableStyleType = srcPivot.PivotTableStyleType;
The "srcPivot" is the pivot table in worksheet "Top 10". It doesn't seemed take effect. When I click save in Excel, there is an compatibility Checker poped out, and if I click the "Find" link, the style will show up.
Could you take a look at this issue and let us know if this is solvable, please?
Thanks and regards
Bill