WebQueryConnection module
- class WebQueryConnection.WebQueryConnection
Bases:
ExternalConnectionRepresents a web query connection in Excel.
This class extends ExternalConnection and provides functionality for managing web query connections, which allow Excel to retrieve data from web pages. It includes properties for configuring connection settings such as URL, refresh options, and data handling preferences.
- property BackgroundRefresh: bool
Gets or sets whether data should be refreshed in the background.
When set to True, Excel will refresh the data in the background without blocking the user interface.
- Returns:
True if background refresh is enabled; otherwise, False.
- Return type:
bool
- property ConnType: ConnectionDataSourceType
Gets the data source type for the connection.
- Returns:
The connection data source type.
- Return type:
ConnectionDataSourceType
- property Consecutive: bool
- property ID: str
Gets the unique identifier for the web query connection.
- Returns:
The connection ID string.
- Return type:
str
- property KeepAlive: bool
Gets or sets whether to maintain the HTTP connection.
When set to True, the HTTP connection will be kept alive between requests.
- Returns:
True if the connection should be kept alive; otherwise, False.
- Return type:
bool
- property Name: str
Gets or sets the name of the web query connection.
- Returns:
The connection name.
- Return type:
str
- property OdcFile: str
Gets or sets the path to the Office Data Connection (ODC) file.
- Returns:
The path to the ODC file.
- Return type:
str
- property OnlyUseConnectionFile: bool
- property ParsePre: bool
- property RefreshedVersion: str
Gets or sets the version of the connection when it was last refreshed.
- Returns:
The version string.
- Return type:
str
- property SaveData: bool
Gets or sets whether to save the external data with the workbook.
When set to True, the data retrieved from the web query will be saved with the workbook.
- Returns:
True if data should be saved with the workbook; otherwise, False.
- Return type:
bool
- property SourceData: bool
- property Url: str
Gets or sets the URL for the web query.
This is the web address from which data will be retrieved.
- Returns:
The URL string.
- Return type:
str
- property Xl2000: bool
