I’m uploading rows (Create from CRUD) into a google spreadsheet with appscript.
The lines are uploaded correctly. But when any of the data contains two or more words separated by space, the entire line is not loaded. Example:
“EmpireState” is OK
“Empire State” = NoOK!
The error message is: “400 That´s an error. Your customer has issued a malformed or illegal request”
I’ve tested several different scripts, several tutorials, several extensions (GSAI2 and GSheet) and the error is always the same in all of them.
I used Chrome and Firefox, another notebook, different smartphones (Moto G1, moto g2, moto g3, sansung) and the error continues.
I also created and started new account on kodular and the error continues.
I can read data and lines perfectly with more than two words. But I can’t write them in the spreadsheet.
Can you help me?
My script is:
function doGet(e) {
return ManageSheet(e);
}
function doPost(e) {
return ManageSheet(e);
}
function ManageSheet(e) {
//Create a new line
if (e.parameter.func == “Create”) {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheets()[0];
var data = e.parameter.nome, e.parameter.email, e.parameter.celular, e.parameter.valor, e.parameter.duracao, e.parameter.detalhes, e.parameter.quantidade];
sh.appendRow(data);
return ContentService.createTextOutput(data);
}
}