public abstract class ExternalConnection
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
boolean |
getBackgroundRefresh()
Indicates whether the connection can be refreshed in the background (asynchronously).
|
abstract int |
getClassType()
Gets the type of this
ExternalConnection object. |
java.lang.String |
getCommand()
The string containing the database command to pass to the data provider API that will
interact with the external source in order to retrieve data
|
int |
getCommandType()
Specifies the OLE DB command type.
|
java.lang.String |
getConnectionDescription()
Specifies the user description for this connection
|
java.lang.String |
getConnectionFile()
Gets the connection file.
|
int |
getConnectionId()
Deprecated.
Use ExternalConnection.Id property instead.
|
java.lang.String |
getConnectionString()
The connection information string is used to make contact with an OLE DB or ODBC data source.
|
int |
getCredentials()
Deprecated.
Use ExternalConnection.CredentialsMethodType property instead.
|
int |
getCredentialsMethodType()
Specifies the authentication method to be used when establishing (or re-establishing) the connection.
|
int |
getId()
Gets the id of the connection.
|
boolean |
getKeepAlive()
True when the spreadsheet application should make efforts to keep the connection
open.
|
java.lang.String |
getName()
Specifies the name of the connection.
|
java.lang.String |
getOdcFile()
Specifies the full path to external connection file from which this connection was
created.
|
boolean |
getOnlyUseConnectionFile()
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.
|
ConnectionParameterCollection |
getParameters()
Gets
ConnectionParameterCollection for an ODBC or web query. |
PowerQueryFormula |
getPowerQueryFormula()
Gets the definition of power query formula.
|
int |
getReconnectionMethod()
Deprecated.
Use ExternalConnection.ReconnectionMethodType property instead.
|
int |
getReconnectionMethodType()
Specifies what the spreadsheet application should do when a connection fails.
|
int |
getRefreshInternal()
Specifies the number of minutes between automatic refreshes of the connection.
|
boolean |
getRefreshOnLoad()
True if this connection should be refreshed when opening the file; otherwise, false.
|
boolean |
getSaveData()
True if the external data fetched over the connection to populate a table is to be saved
with the workbook; otherwise, false.
|
boolean |
getSavePassword()
True if the password is to be saved as part of the connection string; otherwise, False.
|
java.lang.String |
getSecondCommand()
Specifies a second command text string that is persisted when PivotTable server-based
page fields are in use.
|
java.lang.String |
getSourceFile()
Used when the external data source is file-based.
|
int |
getSourceType()
Gets the external connection DataSource type.
|
java.lang.String |
getSSOId()
Identifier for Single Sign On (SSO) used for authentication between an intermediate
spreadsheetML server and the external data source.
|
int |
getType()
Deprecated.
Use ExternalConnection.SourceType property instead.
|
boolean |
isDeleted()
Indicates whether the associated workbook connection has been deleted.
|
boolean |
isNew()
True if the connection has not been refreshed for the first time; otherwise, false.
|
void |
setBackgroundRefresh(boolean value)
Indicates whether the connection can be refreshed in the background (asynchronously).
|
void |
setCommand(java.lang.String value)
The string containing the database command to pass to the data provider API that will
interact with the external source in order to retrieve data
|
void |
setCommandType(int value)
Specifies the OLE DB command type.
|
void |
setConnectionDescription(java.lang.String value)
Specifies the user description for this connection
|
void |
setConnectionString(java.lang.String value)
The connection information string is used to make contact with an OLE DB or ODBC data source.
|
void |
setCredentials(int value)
Deprecated.
Use ExternalConnection.CredentialsMethodType property instead.
|
void |
setCredentialsMethodType(int value)
Specifies the authentication method to be used when establishing (or re-establishing) the connection.
|
void |
setDeleted(boolean value)
Indicates whether the associated workbook connection has been deleted.
|
void |
setKeepAlive(boolean value)
True when the spreadsheet application should make efforts to keep the connection
open.
|
void |
setName(java.lang.String value)
Specifies the name of the connection.
|
void |
setNew(boolean value)
True if the connection has not been refreshed for the first time; otherwise, false.
|
void |
setOdcFile(java.lang.String value)
Specifies the full path to external connection file from which this connection was
created.
|
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.
|
void |
setReconnectionMethod(int value)
Deprecated.
Use ExternalConnection.ReconnectionMethodType property instead.
|
void |
setReconnectionMethodType(int value)
Specifies what the spreadsheet application should do when a connection fails.
|
void |
setRefreshInternal(int value)
Specifies the number of minutes between automatic refreshes of the connection.
|
void |
setRefreshOnLoad(boolean value)
True if this connection should be refreshed when opening the file; otherwise, false.
|
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.
|
void |
setSavePassword(boolean value)
True if the password is to be saved as part of the connection string; otherwise, False.
|
void |
setSecondCommand(java.lang.String value)
Specifies a second command text string that is persisted when PivotTable server-based
page fields are in use.
|
void |
setSourceFile(java.lang.String value)
Used when the external data source is file-based.
|
void |
setSourceType(int value)
Sets the external connection DataSource type.
|
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.
|
void |
setType(int value)
Deprecated.
Use ExternalConnection.SourceType property instead.
|
public int getId()
public int getConnectionId()
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.Id property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.public abstract int getClassType()
ExternalConnection object.
public PowerQueryFormula getPowerQueryFormula()
public int getType()
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.SourceType property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.public void setType(int value)
Remarks
NOTE: This property is now obsolete. Instead, please use ExternalConnection.SourceType property. This property will be removed 12 months later since October 2024. Aspose apologizes for any inconvenience you may have experienced.public int getSourceType()
public void setSourceType(int value)
public java.lang.String getSSOId()
public void setSSOId(java.lang.String value)
public boolean getSavePassword()
public void setSavePassword(boolean value)
public boolean getSaveData()
public void setSaveData(boolean value)
public boolean getRefreshOnLoad()
public void setRefreshOnLoad(boolean value)
public int getReconnectionMethodType()
public void setReconnectionMethodType(int value)
public int getReconnectionMethod()
Remarks
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.public void setReconnectionMethod(int value)
Remarks
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.public boolean getOnlyUseConnectionFile()
public void setOnlyUseConnectionFile(boolean value)
public java.lang.String getOdcFile()
public void setOdcFile(java.lang.String value)
public java.lang.String getSourceFile()
public void setSourceFile(java.lang.String value)
public java.lang.String getConnectionFile()
public boolean isNew()
public void setNew(boolean value)
public java.lang.String getName()
public void setName(java.lang.String value)
public boolean getKeepAlive()
public void setKeepAlive(boolean value)
public int getRefreshInternal()
public void setRefreshInternal(int value)
public java.lang.String getConnectionDescription()
public void setConnectionDescription(java.lang.String value)
public boolean isDeleted()
public void setDeleted(boolean value)
public int getCredentialsMethodType()
public void setCredentialsMethodType(int value)
public int getCredentials()
Remarks
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.public void setCredentials(int value)
Remarks
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.public boolean getBackgroundRefresh()
public void setBackgroundRefresh(boolean value)
public ConnectionParameterCollection getParameters()
ConnectionParameterCollection for an ODBC or web query.public java.lang.String getCommand()
public void setCommand(java.lang.String value)
public int getCommandType()
See OLEDBCommandType.
public void setCommandType(int value)
See OLEDBCommandType.
public java.lang.String getConnectionString()
public void setConnectionString(java.lang.String value)
public java.lang.String getSecondCommand()
public void setSecondCommand(java.lang.String value)
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.