语言

PivotCache.CommandType 属性

定义

返回或设置一个常量,描述属性的 CommandText 值类型。 默认值是 xlCmdSQL。

public:
 property Microsoft::Office::Interop::Excel::XlCmdType CommandType { Microsoft::Office::Interop::Excel::XlCmdType get(); void set(Microsoft::Office::Interop::Excel::XlCmdType value); };
public Microsoft.Office.Interop.Excel.XlCmdType CommandType { get; set; }
Public Property CommandType As XlCmdType

属性值

注解

XlCmdType 可以是下列 XlCmdType 常量之一:

xlCmdCube。 包含 OLAP 数据源的多维数据集名称。

xlCmdDefault。 包含 OLE DB 提供者可识别的命令文本。

xlCmdSql. 包含 SQL 语句。

xlCmdTable。 包含用于访问 OLE DB 数据源的表名称。

仅当查询表或数据透视表缓存的属性值QueryType为 xlOLEDBQuery 时,才能设置 CommandType 属性。

当 CommandType 属性的值为 xlCmdCube 时,如果没有与查询表相关联的数据透视表,则不能更改该值。

适用于