Worksheet.AddCellRange Method (List(Object), Cell.Address, Cell.Address, Style)

PicoXLSX

PicoXLSX

WorksheetAddCellRange Method (ListObject, CellAddress, CellAddress, Style)

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:  PicoXLSX
Assembly:  PicoXLSX (in PicoXLSX.dll) Version: 2.4.0.0 (2.4.0)
Syntax
C#
public void AddCellRange(
	List<Object> values,
	CellAddress startAddress,
	CellAddress endAddress,
	Style style
)

Parameters

values
Type: System.Collections.GenericListObject
List of unspecified objects to insert
startAddress
Type: PicoXLSXCellAddress
Start address
endAddress
Type: PicoXLSXCellAddress
End address
style
Type: PicoXLSXStyle
Style to apply on the all cells of the range
Exceptions
ExceptionCondition
RangeExceptionThrows an RangeException if the number of cells resolved from the range differs from the number of passed values
StyleExceptionThrows an UndefinedStyleException if the passed style is malformed
Remarks
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
See Also