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 triggerSubmit(e) { | |
//var form = FormApp.getActiveForm(); | |
//var formResponse = form.getResponses()[0]; | |
var formResponse = e.response; | |
var email = formResponse.getRespondentEmail().trim(); | |
Logger.log('email: %s', email); | |
// var responseId = formResponse.getId(); | |
// var time = formResponse.getTimestamp(); |
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
using Microsoft.Data.Sqlite; | |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
namespace DataAccessLibrary | |
{ | |
/// <summary> | |
/// https://docs.microsoft.com/en-us/windows/uwp/data-access/sqlite-databases | |
/// </summary> |
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 inputByForm_(inputString, destinationFolder, logSpreadSheet) { | |
var startTime = Date.now(); | |
var appMessage = {}; | |
var rowContents; | |
var respId = getIdFromUrl(inputString); | |
if (!respId) { | |
appMessage.message = 'Not found ID'; | |
console.log('%s, input: %s - inputByForm', appMessage.message, inputString); | |
rowContents = [appMessage.message]; | |
logSheetAppendRow(logSpreadSheet, rowContents); |
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 findDomainFromSheet(sheet, domain) { | |
var lastRow = sheet.getLastRow(); | |
var startRow = 2; | |
var rows = lastRow - startRow + 1; | |
var values = sheet.getRange(startRow, 1, rows, 1).getValues(); | |
for(var i=0; i<rows; i++) { | |
if (values[i][0] === domain) { | |
var searchRow = startRow + i; | |
// console.log('searchRow: %s', searchRow); | |
var domainKey = domain + 'SheetRow'; |
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
if (sheetFiles.getLastRow() > 30000) { | |
var parentId = sheetFolder.getRange('C3').getValue(); // Copy to folder, id2 | |
var title = copyFolderSs.getName()+'_backup'; | |
// https://developers.google.com/drive/v2/reference/files/copy | |
var respCopy = copyDriveFile_(title, ssId, parentId); | |
if (respCopy && respCopy.id) { | |
rowContents = ['gfolder 스프레드시트 파일 복사', '=HYPERLINK("'+respCopy.alternateLink+'","'+title+'")']; | |
logSheetAppendRow(logSpreadSheet, rowContents); | |
// delete: start ~ filesRow - 2 |
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 myFunction() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var value; | |
var i = 0; | |
var thisRow = 2; | |
do { | |
value = sheet.getRange(thisRow, 1).getValue(); | |
if (value) { | |
thisRow++; |
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 onDropdownAttach(widget) { | |
var props = app.currentPage.properties; | |
google.script.run.withSuccessHandler( function(list) { | |
if(list && list.length > 1) { | |
var listLength = list.length; | |
for(var i = 0; i < listLength; i++) { | |
var drive = list[i]; | |
if (drive.id == props.TeamDriveId) { | |
widget.value = drive.id; | |
} |
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 onMainPageAttach(page) { | |
google.script.run.withSuccessHandler( function(resp) { | |
page.descendants.ToFolderLink.text = resp.title; | |
page.descendants.ToFolderLink.href = resp.link; | |
}).getLinkToFolderByProperty(); | |
} | |
/** | |
* @param {widget} widget - Button widget. | |
* @param {event} |
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
/** | |
* https://developers.google.com/appmaker/tutorials/call-scripts/ | |
* @param {widget} widget - Button widget. | |
* @param {event} | |
*/ | |
function onListFilesClick(widget, event) { | |
var widgets = widget.parent.descendants; | |
var from = widgets.TextBoxFromFolder.value; | |
var to = widgets.TextBoxToFolder.value; |
NewerOlder