@amercado
p136ii_googlesheet_GET_POST.aia (3.2 KB)
Use GET
or
POST and UriEncode
GET: El ñandú de Cádiz.
POST: El and de Cdiz.
POST + UriEncode: El ñandú de Cádiz.
function doGet(e) {
var sheet = SpreadsheetApp.openById(e.parameter.Identificador_Hoja).getSheetByName(e.parameter.Nombre_Hoja);
var func = e.parameter.func;
if (func == 'myFunction') {
rx = e.parameter.rx;
cx = e.parameter.cx;
vx = e.parameter.vx;
sheet.getRange(rx,cx).setValue(vx);
return ContentService.createTextOutput("Agregado con GET.");
}
}
/////////////////////////////////////////////////////////
function doPost(e) {
var sheet = SpreadsheetApp.openById(e.parameter.Identificador_Hoja).getSheetByName(e.parameter.Nombre_Hoja);
var func = e.parameter.func;
if (func == 'myFunction') {
rx = e.parameter.rx;
cx = e.parameter.cx;
vx = e.parameter.vx;
sheet.getRange(rx,cx).setValue(vx);
return ContentService.createTextOutput("Agregado con POST.");
}
}