Skip to main content
getRange
Mitch Stutler avatar
Written by Mitch Stutler
Updated over 8 months ago

The getRange operation will return an array containing an element for each cell in the specified range.

// Initialize SheetSearch
var sheet = new x_vivid_sheets.SheetSearch('a5431dcc1b580210cf82ece03d4bzbab');

// Call getRange with the range of cells you're looking for
var cells = sheet.getRange('B3:D3');

// Return value is: [{"cell":"B3","value":859},
// {"cell":"C3","value":"Kentucky"},{"cell":"D3","value":42}]

gs.info(JSON.stringify(cells));

Valid ranges

A range needs 2 cell keys separated by a colon. The ranges can be vertical, horizontal, or diagonal. Below are some examples

Valid:

B3:J3

B3:B12

B3:J12

Invalid

B3J3

B12:B3

Did this answer your question?