# NOT RUN {
if (gs4_has_token()) {
dat <- tibble::tibble(
fruit = c("date", "lime", "pear", "plum")
)
ss <- gs4_create("range-autofit-demo", sheets = dat)
ss
# open in the browser
gs4_browse(ss)
# shrink column A to fit the short fruit names
range_autofit(ss)
# in the browser, notice how the column width shrank
# send some longer fruit names
dat2 <- tibble::tibble(
fruit = c("cucumber", "honeydew")
)
ss %>% sheet_append(dat2)
# in the browser, see that column A is now too narrow to show the data
range_autofit(ss)
# in the browser, see the column A reveals all the data now
# clean up
gs4_find("range-autofit-demo") %>%
googledrive::drive_trash()
}
# }
Run the code above in your browser using DataLab