aspose.cells

Class ExternalConnection

Specifies an external data connection

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

    • Property Getters/Setters Detail

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