-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Is there any way to change the style of pivot table by the mehod like SetColStyle? #1453
Comments
Thanks for your issue. The library doesn't support set pivot table cell style currently. We need to implement pivot formats for this. Contributions are welcome. I'll certainly accept this feature patch if anybody did that. |
Hi I am not sure if my issue is linked to this one. I am trying to set conditional formatting on a column which has a pivot table in it. The excel sheet creates the conditional formatting rule, but specifically excludes the cells in the pivot table. Is this normal behaviour? I noticed that xlsxConditionalFormatting has a Pivot bool: type xlsxConditionalFormatting struct { If we cant use conditional formatting is there any other way to format these columns/cells? TIA |
That is exactly related to the same reason as this issue. Currently, the library doesn't support changing the cell style in the pivot table. We need to implement pivot formats for this. |
Thanks for clarification. I did a quick test and if the Pivot field is set to true then the conditional formatting does apply to the pivot table. ws.ConditionalFormatting = append(ws.ConditionalFormatting, &xlsxConditionalFormatting{
Pivot: true,
SQRef: area,
CfRule: cfRule,
}) Would it be possible to set that as standard as a quick fix? |
Okay. Would you like to create a pull request to fix that? |
Sure |
I'm trying to make a pivot table with custom style (not default style from excel). It seems
SetColStyle("Sheet1", "H", style)
can't style pivot table. Is there any way to fill color or change font color in any place of pivot table? Thanks for help !ps. I tried to make custom style template from excel pivot table, but that function can only style some fixed place like 'title', 'sum row or col' etc. It's not enough for me. I prefer to adjust every cells by myself like
SetColStyle("Sheet1", "H", style)
feature.The text was updated successfully, but these errors were encountered: