QueryTable.Name 属性 (Excel)QueryTable.Name property (Excel)

返回或设置一个 String 值,它代表对象的名称。Returns or sets a String value representing the name of the object.

语法Syntax

表达式名称expression.Name

_表达式_一个代表查询表对象**** 的变量。expression A variable that represents a QueryTable object.

注解Remarks

下表列出了 Name 属性和相关属性的示例值,同时假设有一个具有唯一名称“[Europe].[France].[Paris]”的 OLAP 数据源,还有一个包含项名称“Paris”的非 OLAP 数据源。The following table shows example values of the Name property and related properties given an OLAP data source with the unique name "[Europe].[France].[Paris]" and a non-OLAP data source with the item name "Paris".

属性Property 值(OLAP 数据源)Value (OLAP data source) 值(非 OLAP 数据源)Value (non-OLAP data source)
CaptionCaption 巴黎Paris 巴黎Paris
NameName [欧洲]。[法国]。巴黎 (只读)[Europe].[France].[Paris]  (read-only) 巴黎Paris
SourceNameSourceName [欧洲]。[法国]。巴黎 (只读)[Europe].[France].[Paris]  (read-only) 与 SQL 属性值相同 (只读)Same as the SQL property value (read-only)
ValueValue [欧洲]。[法国]。巴黎 (只读)[Europe].[France].[Paris]  (read-only) 巴黎Paris

如果使用用户界面导入数据, 则会将来自 web 查询或文本查询的数据作为一个查询表**** 对象导入, 而将所有其他外部数据作为**ListObject** 对象导入。If you import data by using the user interface, data from a web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object.

如果使用对象模型导入数据, 则必须将来自 web 查询或文本查询的数据作为查询表导入****, 而所有其他外部数据均可作为ListObject或查询表导入。 ****If you import data by using the object model, data from a web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable.

Name 属性仅适用于 QueryTable 对象。The Name property applies only to QueryTable objects.

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.