I am trying to upload hundreds of googlesheets using the new R googlesheets4 package using the function gs4_create
. I can successfully upload files in the root of the google drive but fail to see how I can send it inside a pre existing folder on google drive.
See the following reprex:
df <- data.frame(a=1:10,b=letters[1:10])
googlesheets4:: gs4_create(name="TEST_FOLDER/testsheet",sheets=df)
It creates a file named : "TEST_FOLDER/testsheet
in the root folder.
While I want to create the file inside the TEST_FOLDER.
I know I can use write_sheet()
on files pre existing inside a folder but I want to create new files, not write in pre existing files. I also know the googledrive::drive_upload()
will allow me to upload csv files but I do not like the format of the csv files when they are uploaded, as they go as plain text sheets with no frozen first row. This is possible only through the googlesheets4 package. So back to my question:
How do I create a googlesheet files (in bulk) inside the TEST_FOLDER?