实现细目
With the pivot table Show Details feature in Excel, a new sheet is inserted when you double-click on the value cell in a pivot table.
使用Excel中的数据透视表“显示详细信息”功能,双击数据透视表中的值单元格会插入一个新工作表。
It's a great feature for drilling into the details, but you can end up with lots of extra sheets in your workbook.
这是深入研究细节的一项重要功能,但最终可能会在工作簿中增加很多额外的工作表。

Usually, you don't want to save the sheets, so you manually delete them before you close the file.
通常,您不想保存工作表,因此在关闭文件之前手动将其删除。
自动命名工作表 (Automatically Name the Sheets)
With event code on the pivot table's worksheet, and in the workbook module, you can add a prefix – XShow_ – when these detail sheets are created.
使用数据透视表的工作表上以及工作簿模块中的事件代码,可以在创建这些明细表时添加前缀– XShow_ –。

That prefix should make the sheets easier to find and delete.
该前缀应使工作表更易于查找和删除。
自动删除工作表 (Automatically Delete the Sheets)
To make the cleanup task even easier, you can use event code to prompt you to delete those sheet when you're closing the workbook.
为了使清理任务更加容易,您可以使用事件代码在关闭工作簿时提示您删除那些工作表。

If you click Yes, all the sheets with the XShow_ prefix are deleted. Then, click Save, to save the tidied up version of the workbook.
如果单击“是”,则所有带有XShow_前缀的图纸都将被删除。 然后,单击“保存”以保存整理后的工作簿版本。
请参阅明细表代码 (See the Drilldown Sheet Code)
For detailed instructions on adding the drilldown sheet naming and deleting code, visit the Excel Pivot Table Drilldown page on the Contextures website.
有关添加明细表命名和删除代码的详细说明,请访问Contextures网站上的Excel Pivot Table Drilldown页面。
下载样本明细文件 (Download the Sample Drilldown File)
To see how the event code names the sheets, and deletes them when closing, you can download the Pivot Table Drilldown sample file. ________________
若要查看事件代码如何命名工作表,并在关闭时将其删除,可以下载“ 数据透视表明细”样本文件 。 ________________
翻译自: https://contexturesblog.com/archives/2011/06/10/delete-excel-drilldown-sheets-automatically/
实现细目