WebQueryConnection Class

WebQueryConnection class

Specifies the properties for a web query source. A web query will retrieve data from HTML tables,and can also supply HTTP “Get” parameters to be processed by the web server in generating the HTML byincluding the parameters and parameter elements.


type WebQueryConnection struct  {
	ptr unsafe.Pointer
}

Constructors

MethodDescription
NewWebQueryConnectionConstructs from a parent object.

Methods

MethodDescription
IsNullChecks whether the implementation object is nullptr.
GetClassTypeGets the type of this object.
IsXmltrue if the web query source is XML (versus HTML), otherwise false.
SetIsXmltrue if the web query source is XML (versus HTML), otherwise false.
IsXl97This flag exists for backward compatibility with older existing spreadsheet files, and is setto true if this web query was created in Microsoft Excel 97.This is an optional attribute that can be ignored.
SetIsXl97This flag exists for backward compatibility with older existing spreadsheet files, and is setto true if this web query was created in Microsoft Excel 97.This is an optional attribute that can be ignored.
IsXl2000This flag exists for backward compatibility with older existing spreadsheet files, and is setto true if this web query was refreshed in a spreadsheet application newer than or equalto Microsoft Excel 2000.This is an optional attribute that can be ignored.
SetIsXl2000This flag exists for backward compatibility with older existing spreadsheet files, and is setto true if this web query was refreshed in a spreadsheet application newer than or equalto Microsoft Excel 2000.This is an optional attribute that can be ignored.
GetUrlURL to use to refresh external data.
SetUrlURL to use to refresh external data.
GetConnectionFileGets the connection file.
IsTextDatesFlag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
SetIsTextDatesFlag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
IsXmlSourceDataFlag indicating that XML source data should be imported instead of the HTML table itself.
SetIsXmlSourceDataFlag indicating that XML source data should be imported instead of the HTML table itself.
GetPostReturns or sets the string used with the post method of inputting data into a web serverto return data from a web query.
SetPostReturns or sets the string used with the post method of inputting data into a web serverto return data from a web query.
IsParsePreFlag indicating whether data contained within HTML PRE tags in the web page isparsed into columns when you import the page into a query table.
SetIsParsePreFlag indicating whether data contained within HTML PRE tags in the web page isparsed into columns when you import the page into a query table.
IsHtmlTablesFlag indicating whether web queries should only work on HTML tables.
SetIsHtmlTablesFlag indicating whether web queries should only work on HTML tables.
GetHtmlFormatHow to handle formatting from the HTML source when bringing web query data into theworksheet. Relevant when sourceData is True.
SetHtmlFormatHow to handle formatting from the HTML source when bringing web query data into theworksheet. Relevant when sourceData is True.
IsSameSettingsFlag indicating whether to parse all tables inside a PRE block with the same width settingsas the first row.
SetIsSameSettingsFlag indicating whether to parse all tables inside a PRE block with the same width settingsas the first row.
GetEditWebPageThe URL of the user-facing web page showing the web query data. This URL is persistedin the case that sourceData=“true” and url has been redirected to reference an XML file.Then the user-facing page can be shown in the UI, and the XML data can be retrievedbehind the scenes.
SetEditWebPageThe URL of the user-facing web page showing the web query data. This URL is persistedin the case that sourceData=“true” and url has been redirected to reference an XML file.Then the user-facing page can be shown in the UI, and the XML data can be retrievedbehind the scenes.
IsConsecutiveFlag indicating whether consecutive delimiters should be treated as just one delimiter.
SetIsConsecutiveFlag indicating whether consecutive delimiters should be treated as just one delimiter.
GetIdGets the id of the connection.
GetSourceTypeGets or Sets the external connection DataSource type.
SetSourceTypeGets or Sets the external connection DataSource type.
GetSSOIdIdentifier for Single Sign On (SSO) used for authentication between an intermediatespreadsheetML server and the external data source.
SetSSOIdIdentifier for Single Sign On (SSO) used for authentication between an intermediatespreadsheetML server and the external data source.
GetSavePasswordTrue if the password is to be saved as part of the connection string; otherwise, False.
SetSavePasswordTrue if the password is to be saved as part of the connection string; otherwise, False.
GetSaveDataTrue if the external data fetched over the connection to populate a table is to be savedwith the workbook; otherwise, false.
SetSaveDataTrue if the external data fetched over the connection to populate a table is to be savedwith the workbook; otherwise, false.
GetRefreshOnLoadTrue if this connection should be refreshed when opening the file; otherwise, false.
SetRefreshOnLoadTrue if this connection should be refreshed when opening the file; otherwise, false.
GetReconnectionMethodTypeSpecifies what the spreadsheet application should do when a connection fails.The default value is ReConnectionMethodType.Required.
SetReconnectionMethodTypeSpecifies what the spreadsheet application should do when a connection fails.The default value is ReConnectionMethodType.Required.
GetOnlyUseConnectionFileIndicates whether the spreadsheet application should always and only use theconnection information in the external connection file indicated by the odcFile attributewhen the connection is refreshed. If false, then the spreadsheet applicationshould follow the procedure indicated by the reconnectionMethod attribute
SetOnlyUseConnectionFileIndicates whether the spreadsheet application should always and only use theconnection information in the external connection file indicated by the odcFile attributewhen the connection is refreshed. If false, then the spreadsheet applicationshould follow the procedure indicated by the reconnectionMethod attribute
GetOdcFileSpecifies the full path to external connection file from which this connection wascreated. If a connection fails during an attempt to refresh data, and reconnectionMethod=1,then the spreadsheet application will try again using information from the external connection fileinstead of the connection object embedded within the workbook.
SetOdcFileSpecifies the full path to external connection file from which this connection wascreated. If a connection fails during an attempt to refresh data, and reconnectionMethod=1,then the spreadsheet application will try again using information from the external connection fileinstead of the connection object embedded within the workbook.
GetSourceFileUsed when the external data source is file-based.When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May beexpressed in URI or system-specific file path notation.
SetSourceFileUsed when the external data source is file-based.When a connection to such a data source fails, the spreadsheet application attempts to connect directly to this file. May beexpressed in URI or system-specific file path notation.
IsNewTrue if the connection has not been refreshed for the first time; otherwise, false.This state can happen when the user saves the file before a query has finished returning.
SetIsNewTrue if the connection has not been refreshed for the first time; otherwise, false.This state can happen when the user saves the file before a query has finished returning.
GetNameSpecifies the name of the connection. Each connection must have a unique name.
SetNameSpecifies the name of the connection. Each connection must have a unique name.
GetKeepAliveTrue when the spreadsheet application should make efforts to keep the connectionopen. When false, the application should close the connection after retrieving theinformation.
SetKeepAliveTrue when the spreadsheet application should make efforts to keep the connectionopen. When false, the application should close the connection after retrieving theinformation.
GetRefreshInternalSpecifies the number of minutes between automatic refreshes of the connection.
SetRefreshInternalSpecifies the number of minutes between automatic refreshes of the connection.
GetConnectionDescriptionSpecifies the user description for this connection
SetConnectionDescriptionSpecifies the user description for this connection
IsDeletedIndicates whether the associated workbook connection has been deleted. true if theconnection has been deleted; otherwise, false.
SetIsDeletedIndicates whether the associated workbook connection has been deleted. true if theconnection has been deleted; otherwise, false.
GetCredentialsMethodTypeSpecifies the authentication method to be used when establishing (or re-establishing) the connection.
SetCredentialsMethodTypeSpecifies the authentication method to be used when establishing (or re-establishing) the connection.
GetBackgroundRefreshIndicates whether the connection can be refreshed in the background (asynchronously).true if preferred usage of the connection is to refresh asynchronously in the background;false if preferred usage of the connection is to refresh synchronously in the foreground.
SetBackgroundRefreshIndicates whether the connection can be refreshed in the background (asynchronously).true if preferred usage of the connection is to refresh asynchronously in the background;false if preferred usage of the connection is to refresh synchronously in the foreground.
GetParametersGets for an ODBC or web query.
GetPowerQueryFormulaGets the definition of power query formula.
GetCommandThe string containing the database command to pass to the data provider API that willinteract with the external source in order to retrieve data
SetCommandThe string containing the database command to pass to the data provider API that willinteract with the external source in order to retrieve data
GetCommandTypeSpecifies the OLE DB command type.1. Query specifies a cube name2. Query specifies a SQL statement3. Query specifies a table name4. Query specifies that default information has been given, and it is up to the provider how to interpret.5. Query is against a web based List Data Provider.
SetCommandTypeSpecifies the OLE DB command type.1. Query specifies a cube name2. Query specifies a SQL statement3. Query specifies a table name4. Query specifies that default information has been given, and it is up to the provider how to interpret.5. Query is against a web based List Data Provider.
GetConnectionStringThe connection information string is used to make contact with an OLE DB or ODBC data source.
SetConnectionStringThe connection information string is used to make contact with an OLE DB or ODBC data source.
GetSecondCommandSpecifies a second command text string that is persisted when PivotTable server-basedpage fields are in use.For ODBC connections, serverCommand is usually a broader query than command (noWHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand),parameter UI can be populated and parameterized queries can be constructed
SetSecondCommandSpecifies a second command text string that is persisted when PivotTable server-basedpage fields are in use.For ODBC connections, serverCommand is usually a broader query than command (noWHERE clause is present in the former). Based on these 2 commands(Command and ServerCommand),parameter UI can be populated and parameterized queries can be constructed