Questions tagged [googlesheets4]

Access Google Sheets using the Sheets API V4

googlesheets4 provides an R interface to Google Sheets via the Sheets API v4. It is a reboot of an earlier package called googlesheets.

82 questions
2
votes
1 answer

When using getSymbols/BatchGetSymbols sometimes I receive download errors. Is there a way I can add a re-try function to my script?

When using 'getSymbols'/'BatchGetSymbols' sometimes I receive "Error in download" when downloading a ticker's price data. I am aware of why these errors occur, normally due to max limits with yahoo's API etc which is fine. > TSLA | yahoo (161|206) |…
2
votes
0 answers

import specific columns from googlesheet using googlesheets4::read_sheet()

I can read in all columns between columns A:O, but this can require indicating many column types that I do not care about. library(googlesheets4) library(tidyverse) gs_ex <- 'https://docs.google.com/spreadsheets/d/' gs_raw <- …
Joe
  • 3,217
  • 3
  • 21
  • 37
2
votes
0 answers

Timeout when importing Google Sheet in R

I'm using the googlesheets4 library in R to authenticate and import a google sheet as part of my shiny app. This works well, however, from time to time, I get errors indicating: Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was…
2
votes
1 answer

R Shiny Dashboard: Upload data from both local file and the online database (such as Google Sheet)

I am a beginner of Shiny dashboard and I have a problem that bothered me a long time. My final target is to assign data to a variable called "myData", but I give the users options to upload data either from local file or online file (in my case…
Master Shi
  • 123
  • 5
2
votes
1 answer

How to write formula in google sheet using r or python?

I'm trying to write an excel SUM formula to google sheet using R. I want to sum for example values A1 + A2 and save the formula for that in A3. The problem is that it should be a formula because I have a big GDoc with many updates Using…
2
votes
0 answers

R Shiny GoogleSheets4: Authentication error in Shinyio server on deployment?

Here is my code for a simple test app: library(shiny) library(shinydashboard) library(googlesheets4) library(googledrive) library(DT) drive_auth(email = "xxxx") shinyws1<-gs4_create("WS1") #table<-read_sheet("xxx") # Define UI for application ui…
Diya
  • 133
  • 6
2
votes
1 answer

Use Shiny to collect data from users in Google Sheet

I would like to use a Shiny interface to collect data from user inputs, such as in this Medium Article The article is written for the googlesheets package, but we now need to use googlesheets4. I think my code will not work due to may lay of…
Susan Switzer
  • 1,531
  • 8
  • 34
2
votes
1 answer

Is there a way to make some formatting in Google Sheet within R

I'm currently on a project aiming to generate some formatted report from R to google sheet. Now I'm using googlesheets4 package and able to write data into google sheet from R. But is there a way to do some formatting work? like bold, italic, add $…
2
votes
1 answer

Is there a way to auto-authenticate access to GoogleSheets upon R Shiny App load? Googlesheets4 authentication trouble

I'm currently working with an R Shiny App that utilizes googlesheets4 to read data in from a GoogleSheet. I recognize that authentication is important for accessing GoogleSheets, so I've tried authenticating the app using the code below in my app.R…
hlag
  • 21
  • 3
2
votes
0 answers

Why R package Googlesheets4 won't recognize my credentials...?

#Google Components#### > library(devtools) > #devtools::install_github("tidyverse/googlesheets4") > library(googlesheets4) > library(googledrive) > #library(googlesheets) > library(gargle) > library(httr) > options(httr_oob_default=TRUE) >…
2
votes
0 answers

cronR for scheduling R script writes .csv column (Date) in wrong format

I've created a script that reads data from two GitHub repositories, reformats the datasets, binds them together by rows and then writes everything in a new .csv file. Then, I scheduled the run of this script every hour through the functionalities of…
nd091680
  • 585
  • 4
  • 15
1
vote
1 answer

How to color a Google Sheets tab in R with googlesheets4

I am working the googlesheets4 package in R and I'm wondering if there is a function that exists for changing the color of a tab? For example, I am looking to make color a tab brown. Before: After:
Bensstats
  • 988
  • 5
  • 17
1
vote
1 answer

GOOGLE SHEETS Search cells and sort and sum diffrent name

Please let me know if it is possible for Google Sheets to sort data separated by "|" and then sum all unique values counting with multiplier. The multiplier is specified with "#". I am sending an example photo of the input data and what I would like…
1
vote
1 answer

Print sheet names from googlesheets

Brand new to googlesheets4. I have an Excel workbook here: library(googlesheets4) read_sheet("https://docs.google.com/spreadsheets/d/1RBtzn3_FXxz1YD4McQJ29pU-UUodKMVM182-Bmx2Xas/edit?usp=sharing") This workbook has 3 sheets. My question is: what…
Salvador
  • 1,229
  • 1
  • 11
  • 19
1
vote
0 answers

Googlesheets4 login in docker container

My aim is to be able to distribute an R script which uses googlesheets4, as a docker image, to my work colleagues. That complicates google authentication, as credentials_user_oauth2() will not open a browser on the host machine. Also I want to…
Mark Hamlin
  • 339
  • 1
  • 10