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

Represents a worksheet declared by an external workbook link. More...

Public Member Functions

 ExternalWorksheet (string name)
 Constructor with name.
ExternalWorksheet AddCell (string address, string value)
 Adds or replaces a cached cell value.
ExternalWorksheet AddCell (string address, string value, ExternalCellValue.DataType type)
 Adds or replaces a cached cell value with defined typ.
bool RemoveCell (string address)
 Removes cached data for a cell.
bool TryGetCell (string address, out ExternalCellValue cell)
 Tries to get cached data for a cell.

Properties

ReadOnlyDictionary< Address, ExternalCellValueCells [get]
 Gets the dictionary on external cells, where the Address is the key and ExternalCellValue is the value.
string Name [get]
 Gets the name of the external worksheet.

Detailed Description

Represents a worksheet declared by an external workbook link.

Definition at line 19 of file ExternalWorksheet.cs.

Constructor & Destructor Documentation

◆ ExternalWorksheet()

NanoXLSX.ExternalWorksheet.ExternalWorksheet ( string name)

Constructor with name.

Parameters
nameName of the external Worksheet

Definition at line 50 of file ExternalWorksheet.cs.

Member Function Documentation

◆ AddCell() [1/2]

ExternalWorksheet NanoXLSX.ExternalWorksheet.AddCell ( string address,
string value )

Adds or replaces a cached cell value.

Parameters
addressAddress of the external cell
valueSting representation of the external cell value, where the default ExternalCellValue.DataType.String is used. Null will be transformed to the type DataType.Empty. The cached value will be an empty string in this case.
Exceptions
ArgumentExceptionThrown if a boolean value is not represented as "0" or "1".

\Remark

The validity of numeric values is not checked. Boolean values must be represented as "0" or "1". The type DataType.Empty discards the passed value.

Definition at line 63 of file ExternalWorksheet.cs.

◆ AddCell() [2/2]

ExternalWorksheet NanoXLSX.ExternalWorksheet.AddCell ( string address,
string value,
ExternalCellValue.DataType type )

Adds or replaces a cached cell value with defined typ.

Parameters
addressAddress of the external cell
valueValue as string representation. Null will be transformed to the type DataType.Empty. The cached value will be an empty string in this case
typeType of the external cell
Exceptions
ArgumentExceptionThrown if a boolean value is not represented as "0" or "1".

\Remark

The validity of numeric values is not checked. Boolean values must be represented as "0" or "1". The type DataType.Empty discards the passed value.

Definition at line 78 of file ExternalWorksheet.cs.

◆ RemoveCell()

bool NanoXLSX.ExternalWorksheet.RemoveCell ( string address)

Removes cached data for a cell.

Parameters
addressAddress to remove

Definition at line 110 of file ExternalWorksheet.cs.

◆ TryGetCell()

bool NanoXLSX.ExternalWorksheet.TryGetCell ( string address,
out ExternalCellValue cell )

Tries to get cached data for a cell.

Parameters
addressAddress of the cached cell
cellOut parameter of the cell value

Definition at line 121 of file ExternalWorksheet.cs.

Property Documentation

◆ Cells

ReadOnlyDictionary<Address, ExternalCellValue> NanoXLSX.ExternalWorksheet.Cells
get

Gets the dictionary on external cells, where the Address is the key and ExternalCellValue is the value.

Definition at line 31 of file ExternalWorksheet.cs.

◆ Name

string NanoXLSX.ExternalWorksheet.Name
get

Gets the name of the external worksheet.

Definition at line 39 of file ExternalWorksheet.cs.


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