Aspose::Cells::ExternalConnections::ExternalConnectionCollection class

ExternalConnectionCollection class

Specifies the ExternalConnection collection.

class ExternalConnectionCollection

Methods

MethodDescription
ExternalConnectionCollection(ExternalConnectionCollection_Impl* impl)Constructs from an implementation object.
ExternalConnectionCollection(const ExternalConnectionCollection& src)Copy constructor.
Get(int32_t index)Gets the ExternalConnection element at the specified index.
Get(const U16String& connectionName)Gets the ExternalConnection element with the specified name.
Get(const char16_t* connectionName)Gets the ExternalConnection element with the specified name.
GetCount()
GetExternalConnectionById(int32_t connId)Gets the ExternalConnection element with the specified id.
IsNull() constChecks whether the implementation object is nullptr.
explicit operator bool() constoperator bool()
operator=(const ExternalConnectionCollection& src)operator=
Set(const ExternalConnection& value, int32_t index)Gets the ExternalConnection element at the specified index.
~ExternalConnectionCollection()Destructor.

Fields

FieldDescription
_implThe implementation object.

Examples

Aspose::Cells::Startup();
Workbook wb(u"connection.xlsx");
ExternalConnectionCollection dataConns = wb.GetDataConnections();
for (int i = 0; i < dataConns.GetCount(); i++)
{
    ExternalConnection dataConn = dataConns.Get(i);
    //get external connection id
    int id = dataConn.GetConnectionId();
}

Aspose::Cells::Cleanup();

See Also