NanoXLSX Library Documentation
![]() | WorksheetAddCell Method (Object, String) |
Adds an object to the defined cell address. If the type of the value does not match with one of the supported data types, it will be casted to a String. A prepared object of the type Cell will not be casted but adjusted
Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 1.2.3.0 (1.2.3)

C#
public void AddCell( Object value, string address )
Parameters
- value
- Type: SystemObject
Unspecified value to insert - address
- Type: SystemString
Cell address in the format A1 - XFD1048576

Exception | Condition |
---|---|
StyleException | Throws an UndefinedStyleException if the active style cannot be referenced while creating the cell |
RangeException | Throws an RangeException if the passed cell address is out of range |
FormatException | Throws a FormatException if the passed cell address is malformed |

Recognized are the following data types: Cell (prepared object), string, int, double, float, long, DateTime, bool. All other types will be casted into a string using the default ToString() method
