Database Reference
In-Depth Information
var projectId =
UserProperties.getProperty(PROJECT_ID_PROPERTY);
if (!projectId) {
throw new Error("Property PROJECT_ID is not
registered");
}
return projectId;
}
/**
* Reads the query from the active selection in the
current
* spreadsheet. To read from more than one cell, just
select the range
* of cells you want.
*/
function readQuery() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getActiveRange();
var values = range.getValues();
query = values.join(' ');
return query;
}
/**
* Given a sheet to write to, the start row and a 2D
array of
* values, writes those values to the sheet.
*/
function writeChunk(sheet, startIndex, data) {
var nRows = data.length;
if (nRows == 0) {
// Nothing to do.
Logger.log('No results to write');
return;
}
var nCols = data[0].length;
sheet.getRange(startIndex, 1, nRows,
Search WWH ::




Custom Search