Worksheet.AddCell Method (Object, Int32, Int32)

PicoXLSX

PicoXLSX

WorksheetAddCell Method (Object, Int32, Int32)

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:  PicoXLSX
Assembly:  PicoXLSX (in PicoXLSX.dll) Version: 2.4.0.0 (2.4.0)
Syntax
C#
public void AddCell(
	Object value,
	int columnAddress,
	int rowAddress
)

Parameters

value
Type: SystemObject
Unspecified value to insert
columnAddress
Type: SystemInt32
Column number (zero based)
rowAddress
Type: SystemInt32
Row number (zero based)
Exceptions
ExceptionCondition
StyleExceptionThrows an UndefinedStyleException if the active style cannot be referenced while creating the cell
RangeExceptionThrows an RangeException if the passed cell address is out of range
Remarks
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