Excel自定义样式问题

When you create an Excel Table, or a Pivot Table, a default style is applied. You can change to a different built-in style, or create custom styles, with your own formatting. There are details below, and an Excel custom styles problem that you might run into.

当您创建Excel表或数据透视表时,将应用默认样式。 您可以使用自己的格式更改为其他内置样式,或创建自定义样式。 下面有详细信息,以及您可能会遇到的Excel自定义样式问题。

创建自定义样式 (Create a Custom Style)

The easiest way to create a custom style is to make a duplicate of a built-in style, that's similar to what you need.

创建自定义样式的最简单方法是复制内置样式,这类似于您需要的样式。

Here are the steps for a pivot table, and you can do the same thing for a named Excel table.

以下是数据透视表的步骤,您可以对命名的Excel表执行相同的操作。

  1. Select a cell in any pivot table, and on the Ribbon, click the Design tab.

    在任何数据透视表中选择一个单元格,然后在功能区上,单击“设计”选项卡。
  2. In the PivotTable Styles gallery, right-click the style you want to duplicate.

    在数据透视表样式库中,右键单击要复制的样式。
  3. In the context menu, click Duplicate.

    在上下文菜单中,单击“复制”。

修改新的自定义样式 (Modify the New Custom Style)

After you duplicate an existing built-in style, type a name for your custom style. Then, change the formatting for one or more of the table elements.

复制现有的内置样式后,请为您的自定义样式键入一个名称。 然后,更改一个或多个表元素的格式。

This video shows how to create a custom style, and modify it.

该视频显示了如何创建和修改自定义样式。

演示地址

自定义样式问题 (Custom Style Problem)

Usually, things go smoothly if you try to modify a custom style, or delete a custom style.

通常,如果您尝试修改自定义样式或删除自定义样式,一切都会顺利进行。

There's one situation when you'll run into a custom style problem though, and thanks to UniMord for letting me know about this!

在某些情况下,您会遇到自定义样式问题,这要感谢UniMord让我知道这一点!

If any sheet in the workbook is protected, you can't modify or delete a Custom Style.

如果工作簿中的任何工作表都受到保护,则不能修改或删除自定义样式。

  • When you choose the Modify command, nothing happens

    当您选择修改命令时,什么也不会发生
  • When you choose Delete, a confirmation message appears, but if you click OK, nothing happens

    当您选择删除时,会出现一条确认消息,但是如果您单击确定,则什么也不会发生

To modify or delete any custom styles, you'll need to unprotect all the sheets first.

要修改或删除任何自定义样式,您需要先取消保护所有工作表。

To see which sheets are protected, click the Ribbon's File tab, and click Info.

若要查看受保护的工作表,请单击功能区的“文件”选项卡,然后单击“信息”。

NOTE: Using the Protect Workbook command does not prevent the custom styles from being modified or deleted. Only the Protect Worksheet command blocks these actions.

注意 :使用“ 保护工作簿”命令不会阻止自定义样式被修改或删除。 仅“ 保护工作表”命令会阻止这些操作。

将自定义样式复制到其他工作簿 (Copy Custom Style to Other Workbook)

After you create custom styles, you might want to use them in other workbooks. There's no built-in command that lets you do that.

创建自定义样式后,可能需要在其他工作簿中使用它们。 没有内置命令可以执行此操作。

  • In Excel 2013 and earlier, you can copy a pivot table that is formatted with a custom style, and paste it into a different workbook. That automatically creates a copy of the custom style in the other workbook.

    Excel 2013和更早版本中 ,您可以复制以自定义样式设置格式的数据透视表,然后将其粘贴到其他工作簿中。 这样会自动在另一个工作簿中创建自定义样式的副本。

  • In Excel 2016 and later, that trick doesn't work. Instead, you can copy the pivot table's worksheet into the other workbook, and the custom style will be copied. (see warning in next section)

    Excel 2016及更高版本中 ,此技巧不起作用。 相反,您可以将数据透视表的工作表复制到另一个工作簿中,并且将复制自定义样式。 (请参阅下一节中的警告)

This video shows the steps in Excel 2013 and earlier.

该视频显示了Excel 2013及更早版本中的步骤。

演示地址

印张复印警告 (Sheet Copy Warning)

Unfortunately, copying the pivot table sheet can also copy defined names from the original workbook. If the original file has lots of define names, use these extra steps:

不幸的是,复制数据透视表还可以复制原始工作簿中的已定义名称。 如果原始文件具有很多定义名称,请使用以下额外步骤:

  • First, copy the pivot table sheet into a new blank workbook

    首先,将数据透视表工作表复制到新的空白工作簿中
  • On the Excel Ribbon's Formulas tab, click Name Manager

    在Excel功能区的“公式”选项卡上,单击“名称管理器”
  • To select all the names, click the first name, then press Shift and click the last name

    要选择所有名称,请单击名字,然后按Shift并单击姓氏
  • Click the Delete button, to delete all the names

    单击删除按钮,删除所有名称
  • Close the Name Manager

    关闭名称管理器
  • Move the pivot table sheet into the other workbook, where you want to add the custom style.

    将数据透视表工作表移到要在其中添加自定义样式的另一个工作簿中。

更多数据透视表样式提示 (More PivotTable Style Tips)

There are more PivotTable Style and formatting tips on my Contextures site.

我的Contextures网站上有更多数据透视表样式和格式提示

If you'd like to see what styles are currently in use, download my PivotTable styles macros, to create a list for your workbook.

如果您想查看当前正在使用的样式,请下载我的PivotTable样式宏 ,为您的工作簿创建一个列表。

翻译自: https://contexturesblog.com/archives/2019/03/28/excel-custom-styles-problem/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值