I want to use google script to make a request and save some data on google sheet.
The problem is when I try to pass some non integer values as parameters in the request.
I think it’s something to do with the fact that sheets uses comma for separating decimal from integer while my program sends the numbers separated by a dot.
This is where I am now:
const doPost = (event) => {
console.log(`doPost`, JSON.stringify(event));
const { parameter } = event;
const { temp, peso } = parameter;
var date = new Date();
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow([date, parseFloat(temp), peso]);
}
When I make a post request with parameters: { temp:1.234, peso:1.234 } the result on google sheet is a big mess.
Does someone have any idea how to fix this?