Aspose::Cells::IExternalLinkCollection Class Referenceabstract

Represents external links collection in a workbook. More...

Inherits IEnumerable, and Object.

Public Member Functions

virtual Aspose::Cells::Systems::Int32 GetCount ()=0
 Gets the number of elements actually contained in the collection. More...
 
virtual Aspose::Cells::Systems::Int32 Add (intrusive_ptr< Aspose::Cells::Systems::String > fileName, intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>> sheetNames)=0
 Adds an external link. More...
 
virtual Aspose::Cells::Systems::Int32 Add (Aspose::Cells::DirectoryType directoryType, intrusive_ptr< Aspose::Cells::Systems::String > fileName, intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>> sheetNames)=0
 Add an external link . More...
 
virtual intrusive_ptr< Aspose::Cells::IExternalLinkGetObjectByIndex (Aspose::Cells::Systems::Int32 index)=0
 Gets the IExternalLink element at the specified index. More...
 
virtual void Clear ()=0
 Removes all external links. More...
 
virtual void Clear (bool updateReferencesAsLocal)=0
 Removes all external links. More...
 
virtual void RemoveAt (Aspose::Cells::Systems::Int32 index)=0
 Removes the specified external link from the workbook. More...
 
virtual void RemoveAt (Aspose::Cells::Systems::Int32 index, bool updateReferencesAsLocal)=0
 Removes the specified external link from the workbook. More...
 
virtual intrusive_ptr< Aspose::Cells::Systems::Collections::IEnumerator > GetEnumerator ()=0
 Get an enumerator that iterates through this collection. More...
 
virtual void add_ref ()
 
virtual int release_ref ()
 

Detailed Description

Represents external links collection in a workbook.

[C++]
//Open a file with external links
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook(new String("d:\\book1.xls"));
//Change external link data source
workbook->GetIWorksheets()->GetIExternalLinks()->GetObjectByIndex(0)->SetDataSource(new String("d:\\link.xls"));

Member Function Documentation

◆ Add() [1/2]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IExternalLinkCollection::Add ( intrusive_ptr< Aspose::Cells::Systems::String >  fileName,
intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>>  sheetNames 
)
pure virtual

Adds an external link.

Parameters
fileNameThe external file name.
sheetNamesAll sheet names of the external file.
Returns
The position of the external name in this list.

◆ Add() [2/2]

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IExternalLinkCollection::Add ( Aspose::Cells::DirectoryType  directoryType,
intrusive_ptr< Aspose::Cells::Systems::String >  fileName,
intrusive_ptr< Aspose::Cells::Systems::Array1D< Aspose::Cells::Systems::String *>>  sheetNames 
)
pure virtual

Add an external link .

Parameters
directoryTypeThe directory type of the file name.
fileNamethe file name.
sheetNamesAll sheet names of the external file.
Returns
The position of the external name in this list.

◆ add_ref()

virtual void Aspose::Cells::IExternalLinkCollection::add_ref ( )
inlinevirtual

◆ Clear() [1/2]

virtual void Aspose::Cells::IExternalLinkCollection::Clear ( )
pure virtual

Removes all external links.

When removing external links, all formulas that reference to them will be removed too because the references become invalid.

◆ Clear() [2/2]

virtual void Aspose::Cells::IExternalLinkCollection::Clear ( bool  updateReferencesAsLocal)
pure virtual

Removes all external links.

Parameters
updateReferencesAsLocalWhether update all references of external links as references of current workbook itself.

◆ GetCount()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::IExternalLinkCollection::GetCount ( )
pure virtual

Gets the number of elements actually contained in the collection.

◆ GetEnumerator()

virtual intrusive_ptr<Aspose::Cells::Systems::Collections::IEnumerator> Aspose::Cells::IExternalLinkCollection::GetEnumerator ( )
pure virtual

Get an enumerator that iterates through this collection.

Returns

◆ GetObjectByIndex()

virtual intrusive_ptr<Aspose::Cells::IExternalLink> Aspose::Cells::IExternalLinkCollection::GetObjectByIndex ( Aspose::Cells::Systems::Int32  index)
pure virtual

Gets the IExternalLink element at the specified index.

Parameters
indexThe zero based index of the element.
Returns
The element at the specified index.

◆ release_ref()

virtual int Aspose::Cells::IExternalLinkCollection::release_ref ( )
inlinevirtual

◆ RemoveAt() [1/2]

virtual void Aspose::Cells::IExternalLinkCollection::RemoveAt ( Aspose::Cells::Systems::Int32  index)
pure virtual

Removes the specified external link from the workbook.

Parameters
indexthe index of the external link to be removed.

When removing the external link, all formulas that reference to it will be removed too because the references become invalid.

◆ RemoveAt() [2/2]

virtual void Aspose::Cells::IExternalLinkCollection::RemoveAt ( Aspose::Cells::Systems::Int32  index,
bool  updateReferencesAsLocal 
)
pure virtual

Removes the specified external link from the workbook.

Parameters
indexthe index of the external link to be removed.
updateReferencesAsLocalWhether update all references of given external link to reference of current workbook itself.