google-drive-api

Restoring specific version of spreadsheet using the Google API

感情迁移 提交于 2020-12-06 13:00:54
问题 Just like the title says, I'm trying to find a way to restore a spreadsheet to a specific version using the Google Sheets API v4 (or Google Drive API v3). This is needed because of unit testing - I need one test to perform some actions (let's say delete a row) on a spreadsheet, assert the results and then reset the spreadsheet to its initial state so the next test can execute on the original spreadsheet. So far I noticed that there isn't an option to do something similar in the Google Sheets

how to read data from google drive using Colaboratory (google)

懵懂的女人 提交于 2020-12-06 04:43:33
问题 I'm new to Colaboratory and would like setup a small project which is stored on my google drive. On my google drive, I create a folder 'TheProject', where I created two folders: 'code' and 'data'. I the folder 'code' I created a new colab notebook and I have several data sets in 'data' folder. QUESTION How to read data into colab notebook from a folder on the google drive? For example: data = pd.read_excel('SOME_PATH/TheProject/data/my_data.xlsx') where SOME_PATH should indicate how to get to

how to read data from google drive using Colaboratory (google)

和自甴很熟 提交于 2020-12-06 04:43:18
问题 I'm new to Colaboratory and would like setup a small project which is stored on my google drive. On my google drive, I create a folder 'TheProject', where I created two folders: 'code' and 'data'. I the folder 'code' I created a new colab notebook and I have several data sets in 'data' folder. QUESTION How to read data into colab notebook from a folder on the google drive? For example: data = pd.read_excel('SOME_PATH/TheProject/data/my_data.xlsx') where SOME_PATH should indicate how to get to

Why Won't Google API V3 Return Children?

杀马特。学长 韩版系。学妹 提交于 2020-12-01 10:17:27
问题 I want to use Python to get a list of all the files/folders in a given folder in Google Drive. The call I'm using is this: query = parentID + " in parents" response = service.files().list(q=query, spaces='drive', fields='files(id, name, parents)').execute() According to the search for files documentation and the migrating to v3 documentation, I should be doing it correctly. But when I run the code, I get the following error: <HttpError 400 when requesting https://www.googleapis.com/drive/v3

Why Won't Google API V3 Return Children?

左心房为你撑大大i 提交于 2020-12-01 10:15:02
问题 I want to use Python to get a list of all the files/folders in a given folder in Google Drive. The call I'm using is this: query = parentID + " in parents" response = service.files().list(q=query, spaces='drive', fields='files(id, name, parents)').execute() According to the search for files documentation and the migrating to v3 documentation, I should be doing it correctly. But when I run the code, I get the following error: <HttpError 400 when requesting https://www.googleapis.com/drive/v3

Google Sheet: Generate a PDF file within a named range and sent it to email

女生的网名这么多〃 提交于 2020-11-29 10:35:53
问题 I'm trying to send a PDF file via email. I saw a code here on how to send an email and it kinda works, but it generates all the visible sheets (hidden sheet is not included) in the PDF file. I already modified it to generate the active sheet but all the data on that sheet is still visible. I have a named range and it's called "print_area_1". Is it possible if I only want to show the "print_area_1" part on the PDF file? Here's my modified code for it. function sendSheetToPdfwithA1MailAdress(){

How to upload an image to google drive using gapi and react

倾然丶 夕夏残阳落幕 提交于 2020-11-25 03:29:47
问题 I'm trying to upload an image to google drive. I followed this tutorial for uploading files, I can upload a simple file but when I try to upload an image I get a corrupted image. In fact, the file is uploaded but the image I want to see is corrupted. I know that the problem is in the body of the request but I don't know where because it's a strange way (boundaries, delimiters, etc). Everything works fine except for the content of the image so you just need to look at the post method that

How to upload an image to google drive using gapi and react

断了今生、忘了曾经 提交于 2020-11-25 03:27:55
问题 I'm trying to upload an image to google drive. I followed this tutorial for uploading files, I can upload a simple file but when I try to upload an image I get a corrupted image. In fact, the file is uploaded but the image I want to see is corrupted. I know that the problem is in the body of the request but I don't know where because it's a strange way (boundaries, delimiters, etc). Everything works fine except for the content of the image so you just need to look at the post method that