Good morning masters, I have had a huge problem for weeks and I have already lost and reread many documents and videos but I don’t think the solution,
I'm trying to read and delete data from the google sheet but this csv error occurs below I don't know what to do, I really need help is a college job.
VIDEO TUTORIAL
scripts google scripts
function doGet(e) {
return ManageSheet(e);
}
function doPost(e) {
return ManageSheet(e);
}
function ManageSheet(e) {
//READ ALL RECORDS
if ( e.parameter.func == "ReadAll") {
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheets()[0];
var rg = sh.getDataRange().getValues();
var outString = '';
for(var row=0 ; row<rg.length ; ++row){
outString += rg[row].join(',') + '\n';
}
return ContentService.createTextOutput(outString).setMimeType(ContentService.MimeType.TEXT);
}
//DELETE SINGLE RECORD
else if (e.parameter.func == "Delete") {
var record = e.parameter.id;
var ss = SpreadsheetApp.getActive();
//var ss = SpreadsheetApp.openById(e.parameter.ID);
var sh = ss.getSheets()[0];
//var sh = ss.getSheetByName(e.parameter.SH);
sh.deleteRow(parseInt(record) + 1); //makes the correct row to delete (because of header row)
return ContentService.createTextOutput("Success, requested action completed");
Yes, the guy who made the videos has copied (not always very well) all my scripting and blocks from my web site.....
To troubleshoot, the first thing you need to do is add a label, then set the responseContent for Web1.GotText to that label so we can see what is coming back.
The problem can be in:
The spreadsheet
The script
The blocks
Something else
so we need to start with what the script is returning
according to the error message, you are using somewhere in your blocks a list from csv table block... unfortunately we can't see that block in your latest screenshot..
someone could help me, i know they are volunteers but if they can open the aia. that I sent to help me.
the code snippet is small.
I think I will fail in this matter: /
I can't make it work
what about following my previous ansnwer to fin dout, what is going on?
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...
which means in your case post a screenshot of your relevant blocks...
To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.