ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 6758|回复: 3

[分享] Microsoft Excel 2000 中数据透视表的限制

[复制链接]

TA的精华主题

TA的得分主题

发表于 2009-4-26 21:21 | 显示全部楼层 |阅读模式
今天网上看到一篇好文章,分享一下!
本文讨论了 Microsoft Excel 中数据透视表存在的一些限制。

更多信息数据透视表是一类交互式的表格,能够对大量数据进行汇总或交叉制表。通过数据透视表,您可以对行和列进行旋转以查看源数据的不同汇总,或通过显示不同页对数据进行筛选,以...数据透视表是一类交互式的表格,能够对大量数据进行汇总或交叉制表。通过数据透视表,您可以对行和列进行旋转以查看源数据的不同汇总,或通过显示不同页对数据进行筛选,以及显示感兴趣区域的细节。

数据透视表存在哪些限制?


以下限制适用于数据透视表。
最大大小


不存在固定的最大大小。最大大小通常只受限于计算机的可用内存量。
列字段


数据透视表所有列字段中项目数的乘积不能超过 32,768。

例如,假定您创建的数据透视表包含 5 个列字段。这些字段分别包含 10、5、2、40 和 3 个项目。这些值的乘积为 10 x 5 x 2 x 40 x 3,即 12,000。

如果您试图再添加一个包含三个项目的字段,则乘积将变为 12,000 x 3,即 36,000。由于该值超过了项目的最大乘积,您将会收到以下错误消息:
内存不足,无法完全显示数据透视表。
注意,Microsoft Excel 的工作表最多能有 256 列。因此,即使您成功创建了包含大量列字段的数据透视表,也可能无法显示整个展开的数据透视表。
行字段


数据透视表所有行字段中项目数的乘积不能超过 2^31(2 的 31 次方),大约 21 亿个项目。用于列字段的逻辑同样也适用于行字段。
最大记录数


在创建数据透视表时,最大可用记录数目没有固定的值。

实际上,从包含大量记录的外部数据库创建数据透视表会损害运行 Excel 的工作站的性能,同时,这需要很长时间才能完成。

如果要从非常大的数据库来创建数据透视表,您可能需要在数据透视表中使用服务器页字段。有关如何在数据透视表中使用服务器页字段的信息,请参见以下章节。
每个透视表字段的最大项目数


每个行字段、列字段或页字段最多可有 8,000 个不同项目。如果您试图将超过此限制的字段拖到数据透视表中,该字段将不会添加到数据透视表中,并可能收到以下警告消息:
源数据中某个字段包含的单一数据项过多。Microsoft Excel 可能不能创建数据透视表,或者不能包含该字段中数据。

如何避免走入这些限制?


避免走入这些限制的一种方法是在数据透视表中使用页字段,这特别适合于字段包含的唯一项目超过 40 个的情况下。使用页字段能让数据透视表更有效地利用内存,并减少数据透视表的大小(以单元格计)。这能让数据透视表更易于读取。

另一种优化数据透视表的方法是使用服务器页字段。

TA的精华主题

TA的得分主题

 楼主| 发表于 2009-4-26 21:27 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
下面是另一种优化数据透视表的方法是使用服务器页字段。不过是英文的,不过大概能懂得它得意思,很有用:
When you create a PivotTable using an external data source, Microsoft Excel has to process all data records returned to it from the external data source. If your database contains a large number of records, this may take a very long time to complete.

You can use server page fields to filter data before it is returned to the PivotTable in Excel to reduce the amount of time required to create the PivotTable. For example, you can use a server page field to return only records where the Country field is equal to "USA."

Using server page fields also helps reduce the amount of memory required to cache information used by the PivotTable.

To use server page fields in a PivotTable, follow these steps:


On the Data menu, click PivotTable and PivotChart Report.
In step 1 of the wizard, click External data source and then click Next.
In step 2 of the wizard, click Get Data. Use Microsoft Query to attach to your external database (this can be any external database and is not limited to databases on a server). Click OK.
Follow the steps in the Create New Data Source dialog box. After the data fields have been retrieved, click Next.

The Query Wizard is now open.
In the Query Wizard, set up the filters that you want, if any. Click Finish to return to the PivotTable and PivotChart Wizard.
In step 2 of the PivotTable and PivotChart Wizard, click Next.
In step 3 of the PivotTable and PivotChart Wizard, click Layout. Drag field names into the Column, Row, Data, and Page areas of the diagram.

NOTE: You must add at least one field name to the Page area; this is the field for which server page fields are created.
In the Page area of the diagram, double-click the field name for which you want to create server page fields.
In the PivotTable Field dialog box, click Advanced.
Under Page field options, click Query external data source and then click OK three times.
In step 3 of the wizard, select a destination for the PivotTable, and then click Finish.
After your PivotTable has been created, you can click the drop-down list in the page field to retrieve data for the selected item. Each time you do this, Microsoft Excel performs the following steps:
Microsoft Excel queries the external data source again and retrieves the appropriate data for the selected page field.
The PivotTable memory cache is cleared and filled with new records.
The PivotTable is refreshed and redisplayed using the newly retrieved records.
Because of the way in which server page fields work, the (All) item is removed from the drop-down list. This is because only a subset of the data in the external data source is being returned to Microsoft Excel.

If you want to show all records, follow these steps:
Double-click the field name in the page field.
In the PivotTable Field dialog box, click Advanced.
In Page field options, click Retrieve external data for all page field items (faster performance). Click OK twice.

TA的精华主题

TA的得分主题

发表于 2009-5-3 14:33 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2009-7-15 15:57 | 显示全部楼层
我们公司还在用,老外觉得2000好,就是不肯用2007,因为数据庞大,超过65000行,所以还要用access,麻烦阿。。。
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-4-28 18:39 , Processed in 0.030390 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表