SpreadsheetAddRows

Adds multiple rows from a query to an Excel spreadsheet object.

Method Signature

SpreadsheetAddRows(spreadsheetObj=[any], data=[any], row=[any], column=[any], insert=[any], datatype=[any], includeColumnNames=[any])

Arguments

Argument
Type
Required
Description
Default

spreadsheetObj

ANY

true

The spreadsheet object.

data

ANY

true

An array of arrays or a query object to add as rows.

Examples

Add multiple rows from array of arrays:

// Add multiple rows at once
var spreadsheet = SpreadsheetNew();
var data = [
    [ "John", "Sales", 75000 ],
    [ "Alice", "Marketing", 65000 ],
    [ "Bob", "IT", 80000 ]
];
SpreadsheetAddRows( spreadsheet, data );

Add a query as spreadsheet rows:

Batch import data:

| row | NUMERIC | false | The row number where to start inserting the data (1-based). If not specified, adds to the end. | | | column | NUMERIC | false | The column number where to start inserting the data (1-based). Default is 1. | | | insert | BOOLEAN | false | Whether to insert new rows or overwrite existing rows. Default is false. | true | | datatype | BOOLEAN | false | The data type to apply to the cells (not implemented in this version). | false | | includeColumnNames | any | false | Whether to include column names as the first row. Default is false. | |

Examples

Last updated

Was this helpful?