0

我无法(1)自动化我试图直接导出到谷歌表格的报告和(2),即使我手动完成警告(见下文)即使在我重新启动后也不相信这是一个交互式会话会话或终止 R 并在稍后返回。

library(devtools)
devtools::install_github("tidyverse/googlesheets4", force = TRUE)
library(googlesheets4)
library(googledrive)
library(gargle)
library(httr)
options(httr_oob_default=TRUE) 
options(gargle_oauth_email = "XYZ@gmail.com")
drive_auth()
MKPI <- list(OVR_KPI_DF,M_KPI,R_KPI,U_KPI,C_KPI)
sheets_auth()
sheets_create(
  paste(currentDate,"_Master_KPI_Review",sep=""),
  sheets = MKPI
)

Error: Can't get Google credentials.
Are you running googlesheets4 in a non-interactive session? Consider:
  * `sheets_deauth()` to prevent the attempt to get credentials.
  * Call `sheets_auth()` directly with all necessary specifics.
See gargle's "Non-interactive auth" vignette for more details:
https://gargle.r-lib.org/articles/non-interactive-auth.html
4

0 回答 0