Aspose::Cells::ExternalConnections::ExternalConnectionCollection class
Contents
[
Hide
]ExternalConnectionCollection class
Specifies the ExternalConnection collection.
class ExternalConnectionCollection
Methods
| Method | Description |
|---|---|
| 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() const | Checks whether the implementation object is nullptr. |
| explicit operator bool() const | operator bool() |
| operator=(const ExternalConnectionCollection& src) | operator= |
| Set(const ExternalConnection& value, int32_t index) | Gets the ExternalConnection element at the specified index. |
| ~ExternalConnectionCollection() | Destructor. |
Fields
| Field | Description |
|---|---|
| _impl | The 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
- Namespace Aspose::Cells::ExternalConnections
- Library Aspose.Cells for C++