aspose.cells

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
functiongetBackgroundRefresh()
function
           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.
functiongetConnectionDescription()
function
           Specifies the user description for this connection
functiongetConnectionId()
Specifies The unique identifier of this connection.
functiongetCredentials()
function
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
functiongetCredentialsMethodType()
function
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
functiongetEditPage()
function
           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.
functiongetEditWebPage()
function
           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.
functiongetHtmlFormat()
function
           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.
functiongetId()
Gets the id of the connection.
functionisConsecutive()
function
           Flag indicating whether consecutive delimiters should be treated as just one delimiter.
functionisDeleted()
function
setDeleted(value)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
functionisHtmlTables()
function
           Flag indicating whether web queries should only work on HTML tables.
functionisNew()
function
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.
functionisParsePre()
function
           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.
functionisSameSettings()
function
           Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.
functionisTextDates()
function
           Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
functionisXl2000()
function
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.
functionisXl97()
function
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.
functionisXml()
function
setXml(value)
           true if the web query source is XML (versus HTML), otherwise false.
functionisXmlSourceData()
function
           Flag indicating that XML source data should be imported instead of the HTML table itself.
functiongetKeepAlive()
function
           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.
functiongetName()
function
setName(value)
           Specifies the name of the connection. Each connection must have a unique name.
functiongetOdcFile()
function
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.
functiongetOnlyUseConnectionFile()
function
           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
functiongetParameters()
Gets ConnectionParameterCollection for an ODBC or web query.
functiongetPost()
function
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.
functiongetPowerQueryFormula()
Gets the definition of power query formula.
functiongetReconnectionMethod()
function
           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.
functiongetReconnectionMethodType()
function
           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.
functiongetRefreshInternal()
function
           Specifies the number of minutes between automatic refreshes of the connection.
functiongetRefreshOnLoad()
function
           True if this connection should be refreshed when opening the file; otherwise, false.
functiongetSaveData()
function
           True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
functiongetSavePassword()
function
           True if the password is to be saved as part of the connection string; otherwise, False.
functiongetSourceFile()
function
           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.
functiongetSSOId()
function
setSSOId(value)
           Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
functiongetType()
Gets or Sets the external connection DataSource type.
functiongetUrl()
function
setUrl(value)
           URL to use to refresh external data.
 

    • Property Getters/Setters Detail

      • isXml/setXml : boolean 

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

        function isXl97() / function 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 

        function isXl2000() / function 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 

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

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

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

        function getPost() / function 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 

        function isParsePre() / function 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 

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

        function getHtmlFormat() / function 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 

        function isSameSettings() / function 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 

        function getEditWebPage() / function 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 

        function getEditPage() / function 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 

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

        function getId()
        
        Gets the id of the connection.
      • getPowerQueryFormula : PowerQueryFormula 

        function getPowerQueryFormula()
        
        Gets the definition of power query formula.
      • getType : ConnectionDataSourceType 

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

        function getSourceFile() / function 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 

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

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

        function getSaveData() / function 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 

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

        function getReconnectionMethodType() / function 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 : Number 

        function getReconnectionMethod() / function 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 

        function getOnlyUseConnectionFile() / function 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 

        function getOdcFile() / function 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 

        function isNew() / function 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 

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

        function getKeepAlive() / function 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 : Number 

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

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

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

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

        function getCredentialsMethodType() / function 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 : Number 

        function getCredentials() / function 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 

        function getBackgroundRefresh() / function 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.