Automatically resize all columns in a google spreadsheet
Source:R/drive_utils.R
cloud_drive_spreadsheet_autofit.RdFinds the spreadsheet by path relative to a project root.
Applies googlesheets4::range_autofit() to each sheet.
Arguments
- file
Path to a file relative to project folder root. Can contain only letters, digits, '-', '_', '.', spaces and '/' symbols.
- root
Google Drive ID or URL of the project root. This serves as the reference point for all relative paths. When left as
NULL, the root is automatically derived from thecloudfs.drivefield of the project's DESCRIPTION file.
Examples
if (FALSE) { # interactive()
cloud_drive_write(mtcars, "results/mtcars.xlsx")
cloud_drive_spreadsheet_autofit("results/mtcars.xlsx")
}