I'm struggling to configure this code snippet.
My task is to create a script that extracts data from table (A25:C38) and saves it into another table as a single record. I have limited experience with FOR loops and I'm fairly new to java, could you offer some guidance?
I attempted to write some code but it's not functioning properly. Can you assist me?
function saveCost() {
//var data = fieldRangeCost.getValues()
for (var i = 26; i <= 38; i++) {
var fieldRangeCost = ss.getDataRange("A"+[i],"B"+[i])
console.log(fieldRangeCost)
const fieldvaluesCost = fieldRangeCost.map(f => formws.getRange(f).getValue())
console.log(fieldvaluesCost)
}
}
I tried troubleshooting the code but did not succeed