Description
Adds multiple rows from a query to an Excel spreadsheet object.
Returns
Does not return a value.
Category
Microsoft Office Integration
Function syntax
SpreadsheetAddrows(spreadsheetObj, data [, row, column, insert, datatype, includeColumnNames]) |
See also
SpreadsheetAddColumn, SpreadsheetAddImage, SpreadsheetAddRow, SpreadsheetDeleteRow, SpreadsheetDeleteRows,
SpreadsheetFormatRow, SpreadsheetFormatRows, SpreadsheetShiftRows
History
ColdFusion 11: Added the datatype attribute
ColdFusion 9: Added the function.
Parameters
Parameter |
Description |
|
---|---|---|
spreadsheetObj |
The Excel spreadsheet object to which to add the column. |
|
data |
A query object with the row data or an array. |
|
row |
(Optional) The number of the row at which to insert the rows. The row numbers of any existing rows with numbers equal to or greater than this value are incremented by number of added rows. If you specify a value for this parameter, you must also specify a value for column. If you omit this parameter the rows are inserted following the last current row. |
|
includeColumnNames |
(Optional) A boolean value that enables or disables writing of column headers to spreadsheet object. By default, the value is false. |
|
column |
(Optional) The number of the column in which to add the column data. All columns in the row to the left of the start column have empty cells. If you specify a value for this parameter, you must also specify a value for row. |
|
insert |
(Optional) This parameter is optional. The default value is true. A Boolean value specifying whether to insert a row. If false, the function replaces data in the specified row entries. |
|
datatype | (Optional) Array of datatype expressions. For more information on expressions, see the datatype parameter description in the function SpreadsheetAddRow. |
Example
The following example creates a spreadsheet by creating a new Excel spreadsheet object and using the AddRows function to add the data from a query.
<cfquery |
The following example shows the usage of the datatype parameter: