Aspose::Cells::ExternalConnections::ExternalConnectionCollection class

ExternalConnectionCollection class

Specifies the ExternalConnection collection.

class ExternalConnectionCollection

Methods

MethodDescription
begin()Returns an iterator to the beginning of the ExternalConnectionCollection.
end()Returns an iterator to the end of the ExternalConnectionCollection.
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()Gets the number of elements contained in the instance.
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=
~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