That is an error in the app, not in the google apps script. Check other blocks, or disable anything else
i thinks its from appscript,
because when i copy the full url from web3, and paste to browser, the message its error, please try again
err1.txt (1.4 KB)
Ah, you have your script function in the doPost(). It needs to be in the doGet().
I have now had a chance to review the script requirements, this is tested and working:
function doGet(e) {
var ss = SpreadsheetApp.openById('<your spreadsheet ID');
var sh1 = ss.getSheetByName('<your sheet name>');
var rg = sh1.getDataRange().getValues();
var fn = e.parameter.fn;
if ( fn == 'DELETE' ) {
var student_name = e.parameter.student_name;
for (var i = 0; i < rg.length; i++ ) {
if ( student_name == rg[i][0] ) {
sh1.deleteRow(i+1);
}
}
return ContentService.createTextOutput("Record deleted");
}
}
AMAAZIING its Succesfully. thanks a lot sir
may i ask again another question sir ?
i want to save the data from MIT to google sheet use appscipt, but with dynamic sheet name, so in the script, iam use parameter to store a dynamic sheet name or sheet id, but it has error, this the desciption
Can you help me again sir ?
Do you want to create a new sheet in the spreadsheet, or just use an existing sheet in the spreadsheet by supplying its name / position ?
use existing sheet, and add the row data from MIT
This
is confusing....
replace with this ?
var sht1 = ss.getSheetByName(e.parameters.sht0);
still error sir
What value are you passing in global sheet_code
, and is that the name of a sheet on the spreadsheet ?
DONEEEE
i tried to re deploy with new file, and its success. thanks again sir
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.