google-apps

Google script: Download web image and save it in a specific drive folder

半城伤御伤魂 提交于 2020-01-23 12:34:53
问题 I need to download an image with GS and save it in a specific drive folder. I'm able to save the image in the root folder but i cannot save it in a specific folder: function downloadFile(fileURL,folder) { var fileName = ""; var fileSize = 0; var response = UrlFetchApp.fetch(fileURL, {muteHttpExceptions: true}); var rc = response.getResponseCode(); if (rc == 200) { var fileBlob = response.getBlob() var folder = DriveApp.getFoldersByName(folder); if (folder != null) { var file = DriveApp

Not able to remove Google App engine Service from the admin console

二次信任 提交于 2020-01-23 07:06:06
问题 How to delete Google app engine services from admin console which was added through developer email login. After paid google hosting now I am not able to login with developer email account Its now only allow with the email account which I open for this domain email account. I set all the permission (Super Admin, Groups Admin, User Management Admin, Help Desk Admin, Services Admin) but still when I try to remove Google app engine service from admin console it give this error, You do not have

Delete a row in Google Spreadsheets if color of cell is a certain color

只谈情不闲聊 提交于 2020-01-17 06:45:24
问题 So I've be racking my brain about this one for a while now, not 100% sure why this code isn't working. I got the code from a previous SO post, from there I changed the script to do what I needed. function onOpen() { // get active spreadsheet var ss = SpreadsheetApp.getActiveSpreadsheet(); // create menu var menu = [{name: "Evaluate Column J/Call Duration", functionName: "deleteRow"}]; // add to menu ss.addMenu("Delete Calls Under 1 Minute", menu); } function deleteRow() { // get active

Docx to Google Doc using Google Script

橙三吉。 提交于 2020-01-17 03:45:13
问题 I have a lot of docx files ( ~ 72 ) , their MIMETYPE is : application/vnd.openxmlformats-officedocument.wordprocessingml.document and I want to convert all of them to GoogleDocument so I can edit them online to do so I need them to be application/vnd.google-apps.document Is this possible ? I've tried with blob but nothing works , there is a way to create a new google doc with the same format ? 回答1: Got it . var docx = DriveApp.getFileById("###"); var newDoc = Drive.newFile(); var blob =docx

How can I create google apps user account programatically

老子叫甜甜 提交于 2020-01-16 18:46:54
问题 My organisation (Polish Scouting Association) has it's own google apps domain, and every scout is entiteled to have one e-mail address. We decided to create an WWW application in which user can authorize, and sets up his own google apps account. To do this we need to have a progammatic, non-interactive a way to create google apps accounts. To be clear: User logs in to our application using credentials we use throught out organisation He initiates google apps account creation Our application

IF statement in query

我是研究僧i 提交于 2020-01-16 18:42:27
问题 I have a table with two columns A and B the first is a tag and the second is an amount. I am trying to write a query with two columns, one summing up negative values while the other summing up positive ones. Coming from SQL, I tried the following =QUERY(A1:B100, "SELECT A, SUM( B * IF(B>0, 0, 1) ), SUM( B * IF(B<0, 0, 1) ) GROUP BY A ") But it seems that the IF function is not supported in a query. I know I can create two intermediate columns in my sheet (one for positive value and one for

Is there a way to skip the “Your domain administrator has approved” page in Apps Marketplace Oauth2?

核能气质少年 提交于 2020-01-16 18:33:09
问题 I have a Google Apps Marketplace (v2) app I am working on setting up Oauth2 for. I've got everything working, but for some reason when I do a redirect to the authentication page, after, after you select which Google account to use (if like you're me and are testing, you have to pick one of several Google accounts you're currently signed into), I get sent to another page which seems utterly pointless: This is bizarre and annoying, because I am logging in as the domain administrator! Does

Google Spreadsheet - Custom menu won't load because onOpen won't fire

。_饼干妹妹 提交于 2020-01-16 09:05:50
问题 I'm doing everything as prescribed in the 'Defining Spreadsheet Menus' tutorial. The menu is modified using the onOpen event handler. I have made this 'Text to Columns' script available publicly in the 'Script Gallery' but I'm concerned that users who download may be confused when it takes a long time for the custom menu to pop up. Getting the script to load the first time is proving to be a pain. Much of the time the onOpen trigger is missed altogether. It appears that the trigger isn't

Best way to connect a spreadsheet to web database

别来无恙 提交于 2020-01-12 08:11:10
问题 I'm using web based database for which I need to add spreadsheet capabilities to its front end. I was thinking that I could use Google Docs Spreadsheets. Their Google App Script seems to have the functionally that I need. In particular I can use the URLFetch service combined with onEdit events to keep the spreadsheet and DB in sync -- AJAX style. It also allows me a lot of flexibility in constructing, saving, and sharing the spreadsheets However some things about Google App Script gave me

Google App Script Trigger Id Format

左心房为你撑大大i 提交于 2020-01-11 07:00:30
问题 I am working on Google Spreadsheet's project where I am adding/deleting TimeBased triggers through scripting. All triggers fired will run one function, which will check its Id and run function accordingly. I am saving starting trigger and saving it's id with this code. function startTimer(rn) { var triggerid = ScriptApp.newTrigger('mainFunction') .timeBased() .everyMinutes(1) .create().getUniqueId(); SpreadsheetApp.getActiveSheet().getRange(1, 8).setValue(triggerid); } This functions save's