I have 3 values that I have generated in array, that I want to append to a named range in the empty cells, at the beginning of the named range. I want it to fill in those empty cells, not add the values at the end of the range, which it is doing now. Here is an example of the code. The Named range is called BSNID
. Screenshots included as well. Thank you.
const pushDataUpdates = async (inData, pushRange) => {
return new Promise((resolve, reject) => {
sheets.spreadsheets.values.append({
spreadsheetId,
range: pushRange,
valueInputOption: 'RAW',
insertDataOption: 'OVERWRITE',
includeValuesInResponse: true,
resource: {
majorDimension: 'COLUMNS',
values: [inData]
}
}, (err,res) => {
if (err) {
reject(err)
} else {
console.log('Updating idList')
//console.log(res);
resolve();
}
})
})
}
pushDataUpdates([1,2,3], 'BSNID')