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
/** | |
This is a code of Google Apps Script for copying google drive folder content to other folder. | |
## Which situation the code resolve. | |
Google doesn't allow to move folder content to other folder which is managed by | |
other organization according to the policy of the GSUITE organization. | |
And, Google doesn't allow to change the content owner to the user in other | |
organizations. |
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
/** @OnlyCurrentDoc */ | |
function myFunction2() { | |
var spreadsheet = SpreadsheetApp.getActive(); | |
var conditionalFormatRules = spreadsheet.getActiveSheet().getConditionalFormatRules(); | |
conditionalFormatRules.push(SpreadsheetApp.newConditionalFormatRule() | |
.setRanges([spreadsheet.getActiveRange()]) | |
.whenFormulaSatisfied('=$H:$H=max(H:H)') | |
.setBackground('#B7E1CD') |
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
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. Use it to add custom menus to Google Docs that allow the user to run | |
* custom scripts. For more information, please consult the following two | |
* resources. | |
* | |
* Extending Google Docs developer guide: | |
* https://developers.google.com/apps-script/guides/docs | |
* | |
* Document service reference documentation: |
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
var CLIENT_ID = '...'; // Get from Quickbooks Developer Console | |
var CLIENT_SECRET = '...'; // Get from Quickbooks Developer Console | |
var BASE_AUTH_URL = 'https://appcenter.intuit.com/connect/oauth2'; | |
var TOKEN_URL = 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer'; | |
var API_SCOPE = 'com.intuit.quickbooks.accounting'; | |
var REDIRECT_URI = '...'; // Generate using the logRedirectUri() function mentioned at the end of this script | |
var RESPONSE_TYPE = 'code'; | |
/** | |
* Authorizes and makes a request to the Quickbooks API using OAuth 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
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var USERS_TABLE = spreadsheet.getSheets()[0]; | |
var IDEAS_TABLE = spreadsheet.getSheets()[1]; | |
var VOTES_TABLE = spreadsheet.getSheets()[2]; | |
function registerUser(user){ | |
var data = getTableData(USERS_TABLE); | |
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
/* | |
* Save spreadsheet as a PDF | |
* | |
* Based on Dr.Queso's answer in http://stackoverflow.com/questions/30367547/convert-all-sheets-to-pdf-with-google-apps-script/30492812#30492812 | |
* | |
* @param {String} email Where to send the PDF [OPTIONAL] | |
* @param {String} spreadsheetId Or the active spreadsheet[OPTIONAL] | |
* @param {String} sheetName The tab to output [OPTIONAL] | |
* @param {String} PdfName [OPTIONAL] | |
*/ |
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
//Set of Functions that can be attached to a Google Spreadsheet to facilitate a Google Drive Shared Folder to Team Drive Migration | |
//Author: Jared Garcia | |
//Attach to a Spreadsheet with three Sheets | |
//Link to spreadsheet template: https://docs.google.com/spreadsheets/d/1TPPx1XrEcyXRurZWKpy9Qkm0HSpbkFG3FI8q2jzukuE/edit?usp=sharing | |
//First Sheet needs to be named "Folder Analysis" and havethe following Data in the first row Folder Name, Folder ID, Owner, Parent Folder Name, Parent Folder ID, Gather Folders [NO/YES], Gather Files [NO/YES], | |
//Team Drive Duplicate Name,TD Duplicate ID, File Move [NO/YES], File Move Complete | |
//The Second Sheet should be named "File Analysis" and have the following data File ID, Owner, Folder Parent, Parent ID, Team Drive Move (Y/N) | |
//Third Sheet is called "Change Owner Commands". This sheet isn't necessary but is handy when you need to change a file/folders owner using Google Apps Manager commands. | |
//Version. 0.8 | |
//This is not a completed script as of yet. It currently gathers fo |
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 getBaseUsers() { | |
var options = { | |
"contentType" : "application/json", | |
"headers" : { | |
"Accept": "application/json", | |
"Authorization": "Bearer <TOKEN>" | |
} | |
} | |
var response = UrlFetchApp.fetch("https://api.getbase.com/v2/users", options); | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); |
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 getTrialBalancesWithNoDate() { | |
// . | |
// . | |
// . | |
fetchPublicAppData('Reports/TrialBalance', '', '') // OK | |
// . | |
// . |
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
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
NewerOlder