NanoXLSX.Compatibility 3.2.0
Loading...
Searching...
No Matches
NanoXLSX.ExternalLink Class Reference

Represents a link to an external workbook. More...

Public Member Functions

 ExternalLink (string absoluteUri)
 Constructor of an external workbook link with absolute URI. A valid file definition (e.g. 'workbook.xlsx') is mandatory in the path.
 ExternalLink (string absoluteUri, string relativeUri)
 Constructor of an external workbook link with absolute and relative URI. A valid file definition (e.g. 'workbook.xlsx') is mandatory in relative path.
ExternalLinkBuilder CreateBuilder ()
 Creates a builder for this external workbook link.
void AddDefinedName (string name, string refersTo)
 Adds a defined name from the external workbook.
void AddDefinedName (ExternalDefinedName definedName)
 Adds a defined name from the external workbook.
ExternalWorksheet GetWorksheet (string name)
 Gets an external worksheet by name.

Properties

string AbsoluteUri [get]
 Gets the absolute path or URI of the external workbook.
string RelativeUri [get]
 Gets the optional relative path or URI of the external workbook.
IReadOnlyList< ExternalWorksheetWorksheets [get]
 Gets the worksheets declared for the external workbook. The worksheet index corresponds to the sheetId used in OOXML.
IReadOnlyList< ExternalDefinedNameDefinedNames [get]
 Gets the defined names declared by the external workbook.

Detailed Description

Represents a link to an external workbook.

Definition at line 17 of file ExternalLink.cs.

Constructor & Destructor Documentation

◆ ExternalLink() [1/2]

NanoXLSX.ExternalLink.ExternalLink ( string absoluteUri)

Constructor of an external workbook link with absolute URI. A valid file definition (e.g. 'workbook.xlsx') is mandatory in the path.

Parameters
absoluteUriAbsolute path or URI of the external workbook.
Remarks
No relative path is inferred when only an absolute URI is supplied.

Definition at line 90 of file ExternalLink.cs.

◆ ExternalLink() [2/2]

NanoXLSX.ExternalLink.ExternalLink ( string absoluteUri,
string relativeUri )

Constructor of an external workbook link with absolute and relative URI. A valid file definition (e.g. 'workbook.xlsx') is mandatory in relative path.

Parameters
absoluteUriAbsolute path or URI of the external workbook.
relativeUriRelative path of the external workbook
Remarks
The relative path is usually just a filename (e.g. 'workbook.xlsx') but it can be explicitly defined with a directory part (e.g. '../ workbooks/workbook.xlsx')

Definition at line 101 of file ExternalLink.cs.

Member Function Documentation

◆ AddDefinedName() [1/2]

void NanoXLSX.ExternalLink.AddDefinedName ( ExternalDefinedName definedName)

Adds a defined name from the external workbook.

Parameters
definedNameDefined name object

Definition at line 129 of file ExternalLink.cs.

◆ AddDefinedName() [2/2]

void NanoXLSX.ExternalLink.AddDefinedName ( string name,
string refersTo )

Adds a defined name from the external workbook.

Parameters
nameName of the external defined name.
refersToExpression referenced by the defined name, for example ='Sheet1'!$B$1.

Definition at line 120 of file ExternalLink.cs.

◆ CreateBuilder()

ExternalLinkBuilder NanoXLSX.ExternalLink.CreateBuilder ( )

Creates a builder for this external workbook link.

Definition at line 110 of file ExternalLink.cs.

◆ GetWorksheet()

ExternalWorksheet NanoXLSX.ExternalLink.GetWorksheet ( string name)

Gets an external worksheet by name.

Parameters
nameName of the external defined name

Definition at line 406 of file ExternalLink.cs.

Property Documentation

◆ AbsoluteUri

string NanoXLSX.ExternalLink.AbsoluteUri
get

Gets the absolute path or URI of the external workbook.

Definition at line 24 of file ExternalLink.cs.

◆ DefinedNames

IReadOnlyList<ExternalDefinedName> NanoXLSX.ExternalLink.DefinedNames
get

Gets the defined names declared by the external workbook.

Definition at line 55 of file ExternalLink.cs.

◆ RelativeUri

string NanoXLSX.ExternalLink.RelativeUri
get

Gets the optional relative path or URI of the external workbook.

Definition at line 29 of file ExternalLink.cs.

◆ Worksheets

IReadOnlyList<ExternalWorksheet> NanoXLSX.ExternalLink.Worksheets
get

Gets the worksheets declared for the external workbook. The worksheet index corresponds to the sheetId used in OOXML.

Definition at line 50 of file ExternalLink.cs.


The documentation for this class was generated from the following file: