Syntax
| XLS.SetValue Row, Col, NewValue[, UseBold][, ForceText][, Alignment][, Highlight]
| ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description
| Sets a value into the selected cell, using the current font settings from the XLS.Font object. Optionally applies extra formatting to that cell.
The span for NewValue can hold multiple adjacent columns by placing a vertical bar ("|") between each value.
NEW: When NewValue is an ADODB.Field object (e.g. a field from an open recordset), the cell is automatically formatted based on the SQL data type of the field. This includes correct NumberFormat, date formatting (with time detection), currency display, integer/decimal formatting, and Boolean display (Yes/No).
When ForceText is False (default) and NewValue is not an ADODB.Field, the VarType of the value is used to determine the appropriate NumberFormat (Date, Integer, Double, Currency, Boolean, String with date/numeric detection, formulas starting with "=").
Rows and columns are one-based arrays.
| ||||||||||||||||
See Also
| |||||||||||||||||
Example
| Sub Main |