NanoXLSX Library Documentation
![]() | WorksheetAddCellRange Method (ListObject, String) |
Adds a list of object values to a defined cell range. If the type of the a particular value does not match with one of the supported data types, it will be casted to a String. Prepared objects 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 AddCellRange( List<Object> values, string cellRange )
Parameters
- values
- Type: System.Collections.GenericListObject
List of unspecified objects to insert - cellRange
- Type: SystemString
Cell range as string in the format like A1:D1 or X10:X22

Exception | Condition |
---|---|
RangeException | Throws an RangeException if the number of cells resolved from the range differs from the number of passed values |
StyleException | Throws an UndefinedStyleException if the active style cannot be referenced while creating the cells |
FormatException | Throws a FormatException if the passed cell range is malformed |

The data types in the passed list can be mixed. 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
