poi创建数据透视表_如何创建数据透视表样式

poi创建数据透视表

You don't have to stick with the default formats for your pivot tables. You can create a pivot table style with your own colours, and other formatting options that you like. Here's how to get started, and a video with a simple formatting change that you can make.

您不必遵守数据透视表的默认格式。 您可以使用自己的颜色和所需的其他格式设置选项创建数据透视表样式 。 这是入门方法,以及可以对格式进行简单更改的视频。

内置样式 (Built-In Styles)

There is a big collection of pivot table styles, and you might be satisfied with something from that collection.

数据透视表样式有很多,您可能会对其中的一些内容感到满意。

For example, I like "Pivot Style Light 8", so I'll apply it to my pivot table.

例如,我喜欢“数据透视样式灯8”,因此将其应用于数据透视表。

pivotstyles02

调整内置样式 (Tweak the Built-In Styles)

The style you apply might be almost perfect, but maybe you'd like to make a little tweak to it.

您应用的样式可能几乎是完美的,但也许您想对其进行一些调整。

If I'm printing this pivot table, the grey shading on the subheading rows will make them hard to read. I'd like to get rid of that shading.

如果要打印此数据透视表,则副标题行上的灰色阴影将使它们难以阅读。 我想摆脱这种阴影。

pivotstyles04

无法修改内置样式 (Can't Modify the Built-In Styles)

If I right-click on the style, to try to change it, the Modify command isn't available. Those styles are locked in stone!

如果右键单击样式以尝试更改它,则“修改”命令不可用。 那些样式是固定的!

pivotstyles03

So, to make changes, you can click the Duplicate command, to create a Custom Style. Then, modify that Custom Style, with the formatting that you want.

因此,要进行更改,可以单击“复制”命令以创建自定义样式。 然后,以所需的格式修改该自定义样式。

But before you go to all that trouble, try something easier – it might help in some cases.

但是在您解决所有麻烦之前,请尝试一些简单的操作–在某些情况下可能会有所帮助。

更改样式选项 (Change the Style Options)

There are PivotTable Style Options that you can turn on or off, so try changing those, before you create a Custom Style.

您可以打开或关闭“数据透视表样式”选项,因此在创建“自定义样式”之前,请尝试更改这些选项。

  1. Select a cell in the pivot table

    在数据透视表中选择一个单元格
  2. Click the Design tab (under PivotTable Tools)

    单击设计选项卡(在数据透视表工具下)
    • Row Headers

      行标题
    • Column Headers

      列标题
    • Banded Rows

      带状的行
    • Banded Columns

      带状柱

When I removed the check mark for Row Headers, it took out the grey shading. It took out the Bold text too, but that's fine. You could select the subheadings and their values, and make those Bold, with the commands on the Ribbon's Home tab.

当我删除行标题的复选标记时,它消除了灰色阴影。 它也删除了粗体文本,但这很好。 您可以使用功能区“主页”选项卡上的命令选择子标题及其值,然后将其设置为粗体。

pivotstyles05

创建数据透视表样式 (Create a Pivot Table Style)

If you need more changes than the Style Options provide, then duplicate one of the built-in PivotTable Styles, and modify it. I'll turn the Row Headers option back on, and make a duplicate of the Pivot Style Light 8 style.

如果您需要的更改超出了“样式选项”所提供的范围,请复制一种内置的数据透视表样式,然后进行修改。 我将重新打开“行标题”选项,并复制“透视样式” Light 8样式。

As soon as you click the Duplicate command, the Modify PivotTable Style window opens.

单击“复制”命令后,将打开“修改数据透视表样式”窗口。

  1. Give your style a name, e.g. MY PivotStyleLight8

    给您的样式起一个名字,例如MY PivotStyleLight8
  2. Next, click on one of the items in the list of Table Elements. I've clicked Row Subheading1, and its formatting details show in the bottom section of the window. (NOTE: Elements in Bold text have formatting applied)

    接下来,单击“表元素”列表中的一项。 我单击了行Subheading1,其格式详细信息显示在窗口的底部。 (注意:粗体文本中的元素已应用格式)

    pivotstyles06
  3. Click the Formatting button to change or add formatting, or click the Clear button, to clear the existing formatting. There are more details on my Pivot Table Formatting page.

    单击格式按钮以更改或添加格式,或单击清除按钮以清除现有格式。 我的数据透视表格式页面上有更多详细信息。

  4. After you're finished, click OK

    完成后,单击“确定”。

And nothing changes! There's one more step to do.

并没有任何改变! 还有一个步骤要做。

应用自定义样式 (Apply the Custom Style)

After you create a Custom Style, it isn't applied automatically, to the active pivot table. It's funny, because Excel makes other decisions without a second thought (I'm looking at you, default Compact Layout!)

创建自定义样式后,该样式不会自动应用于活动的数据透视表。 这很有趣,因为Excel无需考虑即可做出其他决定(我在看着你,默认的紧凑版式!)

Anyway, until they add a check box that lets us apply the Custom Style after creating it, we have to apply it ourselves.

无论如何,在他们添加一个允许我们在创建自定义样式后应用它的复选框之前,我们必须自己应用它。

  1. Select a cell in the pivot table

    在数据透视表中选择一个单元格
  2. Click the More button, at the bottom right of the PivotTable Styles list.

    单击“数据透视表样式”列表右下方的“更多”按钮。

    pivotstyles07
  3. In the Custom section, click on your new Custom Style

    在“自定义”部分中,单击新的“自定义样式”

    pivotstyles08

Now the pivot table uses that style, and shows the formatting that you created for that Custom Style.

现在,数据透视表将使用该样式,并显示您为该“自定义样式”创建的格式。

视频:如何创建数据透视表样式 (Video: How to Create a Pivot Table Style)

Here's a short video that shows another example of how to create a Pivot Table Style.

这是一个简短的视频,显示了如何创建数据透视表样式的另一个示例。

演示地址

翻译自: https://contexturesblog.com/archives/2016/05/12/how-to-create-a-pivot-table-style/

poi创建数据透视表

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值