Adds a row to an Excel spreadsheet object.

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

spreadsheetAddRow Argument Reference

spreadsheetObj variableName

The speadsheet

data string

A comma seperated 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.
  • true
  • false

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

Add a row to SpreadSheet

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

Fork me on GitHub