Skip to content

Instantly share code, notes, and snippets.

@tauheed0007
Created April 11, 2022 07:42
Show Gist options
  • Save tauheed0007/e2f3454036ab0313866cac8345d3348a to your computer and use it in GitHub Desktop.
Save tauheed0007/e2f3454036ab0313866cac8345d3348a to your computer and use it in GitHub Desktop.
Google script app for Post data from android app to Google Sheet
function doGet(e) {
handleFunction(e);
}
function doPost(e) {
handleFunction(e);
}
function handleFunction(request){
var name = request.parameter.name;
var country = request.parameter.country;
var id = request.parameter.id;
var ss = SpreadsheetApp.openById(id);
var sheet = ss.getSheetByName("Sheet1");
var rowContent = sheet.appendRow([name,country]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment