google-spreadsheet-api

Authenticating and using a Google Spreadsheet as a database for a web app

烈酒焚心 提交于 2019-12-12 09:19:50
问题 There seem to be many questions in around this topic but none seem to answer my question. I have a simple website with a signup form, and when users enter their email I want to push this as a new row in a Google Spreadsheet I have already setup. I don't want the user to authenticate or even know about this spreadsheet. How do I authenticate so I can start using the Google API? Code/pseudocode would be greatly appreciated! Here are some examples that do not answer my question: Using Google

Dynamic Sheet Name in Query in Google Spreashsheet

蓝咒 提交于 2019-12-12 07:27:55
问题 In Google spreadsheet I want to query data in another sheet but the problem is that the name of sheet is present in a cell. So is there a way in QUERY function to dynamically mention sheet name. Basically I am trying to do something like this but with dynamic sheet name: =QUERY('2012'!A2:F;"select C, sum(F) where A='December' group by C order by sum(F) desc") I tried to do this but I get Parse Error: =QUERY(INDIRECT("Overview!L5")!A2:F;"select C, sum(F) where A='December' group by C order by

Official Google Spreadsheet/Drive usage

一曲冷凌霜 提交于 2019-12-12 05:13:37
问题 The Google SpreadsheetService seems a 'work in progress' with sometimes/suddenly slow answers, random error messages etc. As some people already suggest i'm using the Google Drive API where possible when working with the Spreadsheet API. But i couldn't find decent documentation about the Google Drive/Spreadsheet API mix. With some debugging and trial/error i created an 'entrypoint' at the level of SpreadsheetEntry : String lSpreadsheetFileId = pSpreadsheetFile.getId(); String

Google Sheets SortSpecs

南笙酒味 提交于 2019-12-12 04:14:55
问题 I'm trying to create a request for Google Sheets, but I'm having problems with the sortSpecs method. var test = new Request() { SortRange = new SortRangeRequest() { Range = new GridRange() { SheetId = 0, StartRowIndex = 1 }, SortSpecs = new SortSpec() { SortOrder = "ASCENDING", DimensionIndex = 0 } } }; When using this, everything works correctly except for the SortSpec. Visual Studio gives the error: Cannot implicitly convert type 'Google.Apis.Sheets.v4.Data.SortSpec' to System.Collections

Apps-Script email permissions approved in script editor, but not in sheet?

为君一笑 提交于 2019-12-12 03:58:19
问题 I am using Google Enterprise (in case that makes a difference). I have made a spreadsheet with a very short script, just two functions, one that counts the # of unread gmail mails which I called unread_emails() , and an onOpen() script that copies the current time to a spreadsheet cell (so I know that it's running) and then calls the first function and copies its result to the spreadsheet. When I first ran this from the Script Editor, it asked me for permissions, and I clicked okay. Since

Google Spreadsheet with a service account

只谈情不闲聊 提交于 2019-12-12 03:36:48
问题 I want to access a spreadsheet on Google Drive by using de java Google spreadsheet API. In the past i used the client login method to login but this method is deprecated now. Now I'm trying to use a service account to getting authenticated without interaction with the user because the tool is running in the background i needs to be automated. But i can't get it working. These my code now. List<String> SCOPES_ARRAY = Arrays.asList( "https://www.googleapis.com/auth/drive.file", "https://www

How to Get OAuth Token From GoogleApiClient

狂风中的少年 提交于 2019-12-12 03:35:51
问题 I am trying to build an Android application that created a spreadsheet in Google Drive and then adds some data to it. I can successfuly create the spreadsheet using the Google Drive Android API which involves creating a GoogleApiClient and using a class that implements GoogleApiClient.ConnectionCallbacks . When I start the application I make a new GoogleApiClient and am prompted to select an account. In the onConnected callback I can new pass my GoogleApiClient to Drive.DriveApi to query and

Real-time retrieval of selected range in spreadsheet using GAS

牧云@^-^@ 提交于 2019-12-12 02:27:50
问题 I have a apps script UI modal dialog with textbox and pick button. When I press pick button and select the range of cells in sheets, then it has to copy sheet range address location identified by sheet(0) or sheet(1). Any thoughts? 回答1: Cut or Copy and Paste This is a cut and paste or copy and paste that use a modeless dialog so that you can make the selection even when the dialog is active. function onOpen() { var ui = SpreadsheetApp.getUi(); ui.createMenu('My Tools') .addItem('Copy or Cut',

Google scripting: return value instead of formula

陌路散爱 提交于 2019-12-12 02:14:05
问题 I made a script: function getWN8() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var startRow = 11; var queryString = Math.random(); var dataRange = sheet.getRange(startRow, 3) var data = dataRange.getValues(); var values = SpreadsheetApp.getActiveSheet().getDataRange().getValues() var input, cellFunction, range, row; for (var n=startRow-1; n < values.length;++n){ input = values[n][0]; row = values[n]; cellFunction = '=INDEX(IMPORTHTML("http://en.wot-life

Google Script Carrying over triggers when copying a spreadsheet

╄→гoц情女王★ 提交于 2019-12-12 02:06:21
问题 Okay, so I'm working on a project for my job. We're using Google Drive to track work orders. Here's how it goes: 1) You fill out Request Form describing your work order. 2) Google scripts turns generates info from Request Form into Request Report and creates an Tracking Form 3) Personnel sign off on work order by filling out Tracking Form. Pretty simple, but here's the trouble. I originally had all the Work Orders consolidated on one spreadsheet and you would input the Work Order's ID, but