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

Represents a cached cell of an external worksheet with an optional type. More...

Public Types

enum  DataType {
  Number , Boolean , Date , Error ,
  String , Empty
}
 Enum for the data type of the external cell. More...

Public Member Functions

 ExternalCellValue (string value, DataType type)
 Constructor with value and type.
 ExternalCellValue (string value)
 Constructor with value. The type DataType.String will be used as default type.

Properties

string Value [get]
 Value of the external, cached cell as string representation.
DataType Type [get]
 Type of the external, cached cell value.

Detailed Description

Represents a cached cell of an external worksheet with an optional type.

Definition at line 15 of file ExternalCellValue.cs.

Member Enumeration Documentation

◆ DataType

Enum for the data type of the external cell.

Enumerator
Number 

External cell value is a number. This is the implicit default, if not specified.

Boolean 

External cell value is boolean.

Date 

External cell value is date or date and time (ISO 8601).

Error 

External cell value is an error and not actually a value.

String 

External cell value is a string reference.

Empty 

Not a real type for external cells, but used to mark a non-cached cell value. "0" will be shown as cached value in a local worksheet.

Definition at line 20 of file ExternalCellValue.cs.

Constructor & Destructor Documentation

◆ ExternalCellValue() [1/2]

NanoXLSX.ExternalCellValue.ExternalCellValue ( string value,
DataType type )

Constructor with value and type.

Parameters
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 63 of file ExternalCellValue.cs.

◆ ExternalCellValue() [2/2]

NanoXLSX.ExternalCellValue.ExternalCellValue ( string value)

Constructor with value. The type DataType.String will be used as default type.

Parameters
valueValue as string representation. Null will be transformed to the type DataType.Empty. The cached value will be an empty string in this case

\Remark

The validity of the passed string representation of a number is not checked.

Definition at line 81 of file ExternalCellValue.cs.

Property Documentation

◆ Type

DataType NanoXLSX.ExternalCellValue.Type
get

Type of the external, cached cell value.

\Remark

String values in external cell caches are commonly represented by Excel as DataType.String, even if the referenced source cell contains a formula

Definition at line 47 of file ExternalCellValue.cs.

◆ Value

string NanoXLSX.ExternalCellValue.Value
get

Value of the external, cached cell as string representation.

Definition at line 41 of file ExternalCellValue.cs.


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