asposecells.api

Class ExternalConnection

Specifies an external data connection

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.
methodgetId()
Gets the id of the connection.
methodisDeleted()
method
setDeleted(value)
           Indicates whether the associated workbook connection has been deleted. true if the connection has been deleted; otherwise, false.
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.
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.
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.
 

    • Property Getters/Setters Detail

      • 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.