com.aspose.cells

Class WebQueryConnection

public class WebQueryConnection 
extends ExternalConnection

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
booleangetBackgroundRefresh()
void
setBackgroundRefresh(booleanvalue)
           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.
java.lang.StringgetConnectionDescription()
void
setConnectionDescription(java.lang.Stringvalue)
           Specifies the user description for this connection
intgetConnectionId()
Specifies The unique identifier of this connection.
intgetCredentials()
void
setCredentials(intvalue)
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
intgetCredentialsMethodType()
void
           Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.
java.lang.StringgetEditPage()
void
setEditPage(java.lang.Stringvalue)
           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.
java.lang.StringgetEditWebPage()
void
setEditWebPage(java.lang.Stringvalue)
           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.
intgetHtmlFormat()
void
setHtmlFormat(intvalue)
           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.
intgetId()
Gets the id of the connection.
booleanisConsecutive()
void
setConsecutive(booleanvalue)
           Flag indicating whether consecutive delimiters should be treated as just one delimiter.
booleanisDeleted()
void
setDeleted(booleanvalue)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
booleanisHtmlTables()
void
setHtmlTables(booleanvalue)
           Flag indicating whether web queries should only work on HTML tables.
booleanisNew()
void
setNew(booleanvalue)
           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.
booleanisParsePre()
void
setParsePre(booleanvalue)
           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.
booleanisSameSettings()
void
setSameSettings(booleanvalue)
           Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.
booleanisTextDates()
void
setTextDates(booleanvalue)
           Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
booleanisXl2000()
void
setXl2000(booleanvalue)
           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.
booleanisXl97()
void
setXl97(booleanvalue)
           This flag exists for backward compatibility with older existing spreadhseet 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.
booleanisXml()
void
setXml(booleanvalue)
           true if the web query source is XML (versus HTML), otherwise false.
booleanisXmlSourceData()
void
setXmlSourceData(booleanvalue)
           Flag indicating that XML source data should be imported instead of the HTML table itself.
booleangetKeepAlive()
void
setKeepAlive(booleanvalue)
           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.
java.lang.StringgetName()
void
setName(java.lang.Stringvalue)
           Specifies the name of the connection. Each connection must have a unique name.
java.lang.StringgetOdcFile()
void
setOdcFile(java.lang.Stringvalue)
           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.
booleangetOnlyUseConnectionFile()
void
           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
ConnectionParameterCollectiongetParameters()
Gets ConnectionParameterCollection for an ODBC or web query.
java.lang.StringgetPost()
void
setPost(java.lang.Stringvalue)
           Returns or sets the string used with the post method of inputting data into a web server to return data from a web query.
intgetReconnectionMethod()
void
           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.
intgetReconnectionMethodType()
void
           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.
intgetRefreshInternal()
void
           Specifies the number of minutes between automatic refreshes of the connection.
booleangetRefreshOnLoad()
void
setRefreshOnLoad(booleanvalue)
           True if this connection should be refreshed when opening the file; otherwise, false.
booleangetSaveData()
void
setSaveData(booleanvalue)
           True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.
booleangetSavePassword()
void
setSavePassword(booleanvalue)
           True if the password is to be saved as part of the connection string; otherwise, False.
java.lang.StringgetSourceFile()
void
setSourceFile(java.lang.Stringvalue)
           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.
java.lang.StringgetSSOId()
void
setSSOId(java.lang.Stringvalue)
           Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.
intgetType()
void
setType(intvalue)
           Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.
java.lang.StringgetUrl()
void
setUrl(java.lang.Stringvalue)
           URL to use to refresh external data.
 

    • Property Getters/Setters Detail

      • isXml/setXml

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

        public boolean isXl97() / public void setXl97(boolean value)
        
        This flag exists for backward compatibility with older existing spreadhseet 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

        public boolean isXl2000() / public void setXl2000(boolean 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

        public java.lang.String getUrl() / public void setUrl(java.lang.String value)
        
        URL to use to refresh external data.
      • isTextDates/setTextDates

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

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

        public java.lang.String getPost() / public void setPost(java.lang.String 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

        public boolean isParsePre() / public void setParsePre(boolean 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

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

        public int getHtmlFormat() / public void setHtmlFormat(int 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

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

        public java.lang.String getEditWebPage() / public void setEditWebPage(java.lang.String 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

        public java.lang.String getEditPage() / public void setEditPage(java.lang.String 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

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

        public int getId()
        
        Gets the id of the connection.
      • getType/setType

        public int getType() / public void setType(int value)
        
        Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.
      • getSourceFile/setSourceFile

        public java.lang.String getSourceFile() / public void setSourceFile(java.lang.String 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

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

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

        public boolean getSaveData() / public void setSaveData(boolean 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

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

        public int getReconnectionMethodType() / public void setReconnectionMethodType(int 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

        public int getReconnectionMethod() / public void setReconnectionMethod(int 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

        public boolean getOnlyUseConnectionFile() / public void setOnlyUseConnectionFile(boolean 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

        public java.lang.String getOdcFile() / public void setOdcFile(java.lang.String 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

        public boolean isNew() / public void setNew(boolean 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

        public java.lang.String getName() / public void setName(java.lang.String value)
        
        Specifies the name of the connection. Each connection must have a unique name.
      • getKeepAlive/setKeepAlive

        public boolean getKeepAlive() / public void setKeepAlive(boolean 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

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

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

        public java.lang.String getConnectionDescription() / public void setConnectionDescription(java.lang.String value)
        
        Specifies the user description for this connection
      • isDeleted/setDeleted

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

        public int getCredentialsMethodType() / public void setCredentialsMethodType(int 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

        public int getCredentials() / public void setCredentials(int 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

        public boolean getBackgroundRefresh() / public void setBackgroundRefresh(boolean 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.

    setXml

    public voidsetXml(booleanvalue)
    
    true if the web query source is XML (versus HTML), otherwise false.

    setXl97

    public voidsetXl97(booleanvalue)
    
    This flag exists for backward compatibility with older existing spreadhseet 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.

    setXl2000

    public voidsetXl2000(booleanvalue)
    
    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.

    setUrl

    public voidsetUrl(java.lang.Stringvalue)
    
    URL to use to refresh external data.

    setTextDates

    public voidsetTextDates(booleanvalue)
    
    Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.

    setXmlSourceData

    public voidsetXmlSourceData(booleanvalue)
    
    Flag indicating that XML source data should be imported instead of the HTML table itself.

    setPost

    public voidsetPost(java.lang.Stringvalue)
    
    Returns or sets the string used with the post method of inputting data into a web server to return data from a web query.

    setParsePre

    public voidsetParsePre(booleanvalue)
    
    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.

    setHtmlTables

    public voidsetHtmlTables(booleanvalue)
    
    Flag indicating whether web queries should only work on HTML tables.

    setHtmlFormat

    public voidsetHtmlFormat(intvalue)
    
    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.

    setSameSettings

    public voidsetSameSettings(booleanvalue)
    
    Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.

    setEditWebPage

    public voidsetEditWebPage(java.lang.Stringvalue)
    
    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.

    setEditPage

    public voidsetEditPage(java.lang.Stringvalue)
    
    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.

    setConsecutive

    public voidsetConsecutive(booleanvalue)
    
    Flag indicating whether consecutive delimiters should be treated as just one delimiter.

    setType

    public voidsetType(intvalue)
    
    Gets or Sets the external connection DataSource type. The value of the property is ConnectionDataSourceType integer constant.

    setSourceFile

    public voidsetSourceFile(java.lang.Stringvalue)
    
    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.

    setSSOId

    public voidsetSSOId(java.lang.Stringvalue)
    
    Identifier for Single Sign On (SSO) used for authentication between an intermediate spreadsheetML server and the external data source.

    setSavePassword

    public voidsetSavePassword(booleanvalue)
    
    True if the password is to be saved as part of the connection string; otherwise, False.

    setSaveData

    public voidsetSaveData(booleanvalue)
    
    True if the external data fetched over the connection to populate a table is to be saved with the workbook; otherwise, false.

    setRefreshOnLoad

    public voidsetRefreshOnLoad(booleanvalue)
    
    True if this connection should be refreshed when opening the file; otherwise, false.

    setReconnectionMethodType

    public voidsetReconnectionMethodType(intvalue)
    
    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.

    setReconnectionMethod

    public voidsetReconnectionMethod(intvalue)
    
    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.

    setOnlyUseConnectionFile

    public voidsetOnlyUseConnectionFile(booleanvalue)
    
    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

    setOdcFile

    public voidsetOdcFile(java.lang.Stringvalue)
    
    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.

    setNew

    public voidsetNew(booleanvalue)
    
    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.

    setName

    public voidsetName(java.lang.Stringvalue)
    
    Specifies the name of the connection. Each connection must have a unique name.

    setKeepAlive

    public voidsetKeepAlive(booleanvalue)
    
    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.

    setRefreshInternal

    public voidsetRefreshInternal(intvalue)
    
    Specifies the number of minutes between automatic refreshes of the connection.

    setConnectionDescription

    public voidsetConnectionDescription(java.lang.Stringvalue)
    
    Specifies the user description for this connection

    setDeleted

    public voidsetDeleted(booleanvalue)
    
    Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.

    setCredentialsMethodType

    public voidsetCredentialsMethodType(intvalue)
    
    Specifies the authentication method to be used when establishing (or re-establishing) the connection. The value of the property is CredentialsMethodType integer constant.

    setCredentials

    public voidsetCredentials(intvalue)
    
    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.

    setBackgroundRefresh

    public voidsetBackgroundRefresh(booleanvalue)
    
    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.