i sent you the part reading script here is all script:
function doGet(e) {
var ss = SpreadsheetApp.openByUrl("Garage - Google Sheets");
var sheet = ss.getSheetByName("Sheet1");
addUser(e,sheet);
}
function doPost(e) {
var ss = SpreadsheetApp.openByUrl("Garage - Google Sheets");
var sheet = ss.getSheetByName("Sheet1");
addUser(e,sheet);
}
function addUser(e,sheet) {
var timestamp = e.parameter.timestamp ;
var model = e.parameter.model ;
var platenumber = e.parameter.platenumber;
var maintinance1 = e.parameter.maintinance1 ;
var maintinance2 = e.parameter.maintinance2 ;
var maintinance3 = e.parameter.maintinance3;
var maintinance4 = e.parameter.maintinance4;
var maintinance5 = e.parameter.maintinance5;
var newpart1 = e.parameter.newpart1;
var price1 = e.parameter.price1;
var newpart2 = e.parameter.newpart2;
var price2 = e.parameter.price2;
var newpart3 = e.parameter.newpart3;
var price3 = e.parameter.price3;
var newpart4 = e.parameter.newpart4;
var price4 = e.parameter.price4;
var newpart5 = e.parameter.newpart5;
var price5 = e.parameter.price5;
var newpart6 = e.parameter.newpart6;
var price6 = e.parameter.price6;
var newpart7 = e.parameter.newpart7;
var price7 = e.parameter.price7;
var newpart8 = e.parameter.newpart8;
var price8 = e.parameter.price8;
var newpart9 = e.parameter.newpart9;
var price9 = e.parameter.price9;
var newpart10 = e.parameter.newpart10;
var price10 = e.parameter.price10;
sheet.appendRow ([timestamp,model,platenumber,maintinance1,maintinance2,maintinance3,maintinance4,maintinance5,newpart1,price1,newpart2,price2,newpart3,price3,newpart4,price4,newpart5,price5,newpart6,price6,newpart7,price7,newpart8,price8,newpart9,price9,newpart10,price10]);
}
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.model;
var ss = SpreadsheetApp.getActive();
var sh = ss.getSheets()[0];
sh.deleteRow(parseInt(record) + 1);
return ContentService.createTextOutput("Success");
}
}