Created
September 23, 2019 23:44
-
-
Save amenpunk/c554b3338a4792a13b1e1cf0157d7634 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(e){ | |
var ss = SpreadsheetApp.openByUrl("¿"); | |
var sheet = ss.getSheetByName("Hoja1"); | |
return insert(e,sheet); | |
} | |
function doPost(e){ | |
var ss = SpreadsheetApp.openByUrl("?"); | |
var sheet = ss.getSheetByName("Hoja1"); | |
return insert(e,sheet); | |
} | |
function insert(e,sheet) { | |
var scannedData = e.parameter.sdata; | |
var d = new Date(); | |
var ctime = d.toLocaleString(); | |
sheet.appendRow([scannedData,ctime]); | |
return ContentService | |
.createTextOutput("Success") | |
.setMimeType(ContentService.MimeType.JAVASCRIPT); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment