asposecells.api

Class WebQueryConnection

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 by including the parameters and parameter elements.

Property Getters/Setters Summary
methodgetBackgroundRefresh()
method
           Indicates 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.
methodgetConnectionDescription()
method
           Specifies the user description for this connection
methodgetConnectionId()
Specifies The unique identifier of this connection.
methodgetCredentials()
method
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
methodgetCredentialsMethodType()
method
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
methodgetEditPage()
method
           The URL of the user-facing web page showing the web query data. This URL is persisted in 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 retrieved behind the scenes.
methodgetEditWebPage()
method
           The URL of the user-facing web page showing the web query data. This URL is persisted in 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 retrieved behind the scenes.
methodgetHtmlFormat()
method
           How to handle formatting from the HTML source when bringing web query data into the worksheet. Relevant when sourceData is True. The value of the property is HtmlFormatHandlingType integer constant.
methodgetId()
Gets the id of the connection.
methodisConsecutive()
method
           Flag indicating whether consecutive delimiters should be treated as just one delimiter.
methodisDeleted()
method
setDeleted(value)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
methodisHtmlTables()
method
           Flag indicating whether web queries should only work on HTML tables.
methodisNew()
method
setNew(value)
           True 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.
methodisParsePre()
method
           Flag indicating whether data contained within HTML PRE tags in the web page is parsed into columns when you import the page into a query table.
methodisSameSettings()
method
           Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.
methodisTextDates()
method
           Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
methodisXl2000()
method
setXl2000(value)
           This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was refreshed in a spreadsheet application newer than or equal to Microsoft Excel 2000. This is an optional attribute that can be ignored.
methodisXl97()
method
setXl97(value)
           This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was created in Microsoft Excel 97. This is an optional attribute that can be ignored.
methodisXml()
method
setXml(value)
           true if the web query source is XML (versus HTML), otherwise false.
methodisXmlSourceData()
method
           Flag indicating that XML source data should be imported instead of the HTML table itself.
methodgetKeepAlive()
method
           True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information.
methodgetName()
method
setName(value)
           Specifies the name of the connection. Each connection must have a unique name.
methodgetOdcFile()
method
setOdcFile(value)
           Specifies the full path to external connection file from which this connection was created. 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 file instead of the connection object embedded within the workbook.
methodgetOnlyUseConnectionFile()
method
           Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute
methodgetParameters()
Gets ConnectionParameterCollection for an ODBC or web query.
methodgetPost()
method
setPost(value)
           Returns or sets the string used with the post method of inputting data into a web server to return data from a web query.
methodgetPowerQueryFormula()
Gets the definition of power query formula.
methodgetReconnectionMethod()
method
           Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.
methodgetReconnectionMethodType()
method
           Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.
methodgetRefreshInternal()
method
           Specifies the number of minutes between automatic refreshes of the connection.
methodgetRefreshOnLoad()
method
           True if this connection should be refreshed when opening the file; otherwise, false.
methodgetSaveData()
method
           True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
methodgetSavePassword()
method
           True if the password is to be saved as part of the connection string; otherwise, False.
methodgetSourceFile()
method
           Used 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 be expressed in URI or system-specific file path notation.
methodgetSSOId()
method
setSSOId(value)
           Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
methodgetType()
Gets or Sets the external connection DataSource type.
methodgetUrl()
method
setUrl(value)
           URL to use to refresh external data.
 

    • Property Getters/Setters Detail

      • isXml/setXml : boolean 

        boolean isXml() / setXml(value)
        
        true if the web query source is XML (versus HTML), otherwise false.
      • isXl97/setXl97 : boolean 

        boolean isXl97() / setXl97(value)
        
        This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was created in Microsoft Excel 97. This is an optional attribute that can be ignored.
      • isXl2000/setXl2000 : boolean 

        boolean isXl2000() / setXl2000(value)
        
        This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was refreshed in a spreadsheet application newer than or equal to Microsoft Excel 2000. This is an optional attribute that can be ignored.
      • getUrl/setUrl : String 

        String getUrl() / setUrl(value)
        
        URL to use to refresh external data.
      • isTextDates/setTextDates : boolean 

        boolean isTextDates() / setTextDates(value)
        
        Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
      • isXmlSourceData/setXmlSourceData : boolean 

        boolean isXmlSourceData() / setXmlSourceData(value)
        
        Flag indicating that XML source data should be imported instead of the HTML table itself.
      • getPost/setPost : String 

        String getPost() / setPost(value)
        
        Returns or sets the string used with the post method of inputting data into a web server to return data from a web query.
      • isParsePre/setParsePre : boolean 

        boolean isParsePre() / setParsePre(value)
        
        Flag indicating whether data contained within HTML PRE tags in the web page is parsed into columns when you import the page into a query table.
      • isHtmlTables/setHtmlTables : boolean 

        boolean isHtmlTables() / setHtmlTables(value)
        
        Flag indicating whether web queries should only work on HTML tables.
      • getHtmlFormat/setHtmlFormat : int 

        int getHtmlFormat() / setHtmlFormat(value)
        
        How to handle formatting from the HTML source when bringing web query data into the worksheet. Relevant when sourceData is True. The value of the property is HtmlFormatHandlingType integer constant.
      • isSameSettings/setSameSettings : boolean 

        boolean isSameSettings() / setSameSettings(value)
        
        Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.
      • getEditWebPage/setEditWebPage : String 

        String getEditWebPage() / setEditWebPage(value)
        
        The URL of the user-facing web page showing the web query data. This URL is persisted in 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 retrieved behind the scenes.
      • getEditPage/setEditPage : String 

        String getEditPage() / setEditPage(value)
        
        The URL of the user-facing web page showing the web query data. This URL is persisted in 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 retrieved behind the scenes. NOTE: This property is now obsolete. Instead, please use WebQueryConnection.EditWebPage property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.
      • isConsecutive/setConsecutive : boolean 

        boolean isConsecutive() / setConsecutive(value)
        
        Flag indicating whether consecutive delimiters should be treated as just one delimiter.
      • getId : int 

        int getId()
        
        Gets the id of the connection.
      • getType : ConnectionDataSourceType 

        ConnectionDataSourceType getType()
        
        Gets or Sets the external connection DataSource type.
      • getSourceFile/setSourceFile : String 

        String getSourceFile() / setSourceFile(value)
        
        Used 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 be expressed in URI or system-specific file path notation.
      • getSSOId/setSSOId : String 

        String getSSOId() / setSSOId(value)
        
        Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
      • getSavePassword/setSavePassword : boolean 

        boolean getSavePassword() / setSavePassword(value)
        
        True if the password is to be saved as part of the connection string; otherwise, False.
      • getSaveData/setSaveData : boolean 

        boolean getSaveData() / setSaveData(value)
        
        True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
      • getRefreshOnLoad/setRefreshOnLoad : boolean 

        boolean getRefreshOnLoad() / setRefreshOnLoad(value)
        
        True if this connection should be refreshed when opening the file; otherwise, false.
      • getReconnectionMethodType/setReconnectionMethodType : int 

        int getReconnectionMethodType() / setReconnectionMethodType(value)
        
        Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant.
      • getReconnectionMethod/setReconnectionMethod : int 

        int getReconnectionMethod() / setReconnectionMethod(value)
        
        Specifies what the spreadsheet application should do when a connection fails. The default value is ReConnectionMethodType.Required. The value of the property is ReConnectionMethodType integer constant. NOTE: This property is now obsolete. Instead, please use ExternalConnection.ReconnectionMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.
      • getOnlyUseConnectionFile/setOnlyUseConnectionFile : boolean 

        boolean getOnlyUseConnectionFile() / setOnlyUseConnectionFile(value)
        
        Indicates whether the spreadsheet application should always and only use the connection information in the external connection file indicated by the odcFile attribute when the connection is refreshed. If false, then the spreadsheet application should follow the procedure indicated by the reconnectionMethod attribute
      • getOdcFile/setOdcFile : String 

        String getOdcFile() / setOdcFile(value)
        
        Specifies the full path to external connection file from which this connection was created. 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 file instead of the connection object embedded within the workbook.
      • isNew/setNew : boolean 

        boolean isNew() / setNew(value)
        
        True 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.
      • getName/setName : String 

        String getName() / setName(value)
        
        Specifies the name of the connection. Each connection must have a unique name.
      • getKeepAlive/setKeepAlive : boolean 

        boolean getKeepAlive() / setKeepAlive(value)
        
        True when the spreadsheet application should make efforts to keep the connection open. When false, the application should close the connection after retrieving the information.
      • getRefreshInternal/setRefreshInternal : int 

        int getRefreshInternal() / setRefreshInternal(value)
        
        Specifies the number of minutes between automatic refreshes of the connection.
      • getConnectionId : int 

        int getConnectionId()
        
        Specifies The unique identifier of this connection.
      • getConnectionDescription/setConnectionDescription : String 

        String getConnectionDescription() / setConnectionDescription(value)
        
        Specifies the user description for this connection
      • isDeleted/setDeleted : boolean 

        boolean isDeleted() / setDeleted(value)
        
        Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
      • getCredentialsMethodType/setCredentialsMethodType : int 

        int getCredentialsMethodType() / setCredentialsMethodType(value)
        
        Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
      • getCredentials/setCredentials : int 

        int getCredentials() / setCredentials(value)
        
        Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant. NOTE: This property is now obsolete. Instead, please use ExternalConnection.CredentialsMethodType property. This property will be removed 12 months later since October 2017. Aspose apologizes for any inconvenience you may have experienced.
      • getBackgroundRefresh/setBackgroundRefresh : boolean 

        boolean getBackgroundRefresh() / setBackgroundRefresh(value)
        
        Indicates 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.