spreadsheetAddRow

Adds a row to an Excel spreadsheet object.

spreadsheetAddRow(spreadsheetObj, data [, row] [, column] [, insert] [, datatype]) → returns void

Argument Reference

spreadsheetObj variableName
Required

The spreadsheet

data string
Required

A comma separated list of cell values.

row numeric

Row number at which to insert, if omitted appended.

column numeric
Default: 1

Column number at which to insert data.

insert boolean
Default: true

When true appends data to spreadsheetObj, when false attempts to update rows.

datatype array

CF 11+ List of datatype expressions with values such as STRING NUMERIC or DATE. For example use `DATE:1;NUMERIC:2-2;STRING

Examples
Sample code invoking the spreadsheetAddRow function

<!--- Make a new spreadsheet object --->
<cfset s = spreadsheetNew()>
<!--- Add header row --->
<cfset spreadsheetAddRow(s,"Name,Beers,Vegetables,Fruits,Meats")>
<cfdump var="#s#" />

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub