NanoXLSX.Compatibility 3.2.0
Loading...
Searching...
No Matches
NanoXLSX.Extensions.WorkbookExtensions Class Reference

Writer extension methods for the Workbook class. More...

Static Public Member Functions

static void AddExternalLink (this Workbook workbook, ExternalLink externalLink)
 Adds an external link to the workbook.
static ExternalLink AddExternalLink (this Workbook workbook, ExternalLinkBuilder builder)
 Adds an external link to the workbook, using a builder.
static IReadOnlyList< ExternalLinkGetExternalLinks (this Workbook workbook)
 Gets all external links of the workbook.
static bool RemoveExternalLink (this Workbook workbook, ExternalLink externalLink)
 Removes a specific external link from the workbook.
static void ClearExternalLinks (this Workbook workbook)
 Removes all external links from the workbook.

Detailed Description

Writer extension methods for the Workbook class.

Definition at line 20 of file WorkbookExtensions.cs.

Member Function Documentation

◆ AddExternalLink() [1/2]

void NanoXLSX.Extensions.WorkbookExtensions.AddExternalLink ( this Workbook workbook,
ExternalLink externalLink )
static

Adds an external link to the workbook.

Parameters
workbookWorkbook instance
externalLinkExternal link object to add
Exceptions
ArgumentNullExceptionThrown if the external link object was null

Definition at line 28 of file WorkbookExtensions.cs.

◆ AddExternalLink() [2/2]

ExternalLink NanoXLSX.Extensions.WorkbookExtensions.AddExternalLink ( this Workbook workbook,
ExternalLinkBuilder builder )
static

Adds an external link to the workbook, using a builder.

Parameters
workbookWorkbook instance
builder
Returns
Returns the created and added external link
Exceptions
ArgumentNullExceptionThrown if the builder was null
Remarks
The builder has to be populated first before passing to this method

Definition at line 51 of file WorkbookExtensions.cs.

◆ ClearExternalLinks()

void NanoXLSX.Extensions.WorkbookExtensions.ClearExternalLinks ( this Workbook workbook)
static

Removes all external links from the workbook.

Parameters
workbookWorkbook instance

Definition at line 87 of file WorkbookExtensions.cs.

◆ GetExternalLinks()

IReadOnlyList< ExternalLink > NanoXLSX.Extensions.WorkbookExtensions.GetExternalLinks ( this Workbook workbook)
static

Gets all external links of the workbook.

Parameters
workbookWorkbook instance
Returns
Returns a read-only list of external links, or an empty list, if none are defined in the workbook

Definition at line 67 of file WorkbookExtensions.cs.

◆ RemoveExternalLink()

bool NanoXLSX.Extensions.WorkbookExtensions.RemoveExternalLink ( this Workbook workbook,
ExternalLink externalLink )
static

Removes a specific external link from the workbook.

Parameters
workbookWorkbook instance
externalLinkObject to remove
Returns
Returns true if successfully deleted, otherwise false

Definition at line 78 of file WorkbookExtensions.cs.


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