Skip to contents

Finds the spreadsheet by path relative to a project root. Applies googlesheets4::range_autofit() to each sheet.

Usage

cloud_drive_spreadsheet_autofit(file, root = NULL)

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 the cloudfs.drive field of the project's DESCRIPTION file.

Value

The file ID of the resized Google spreadsheet as an invisible result.

Examples

if (FALSE) { # interactive()
cloud_drive_write(mtcars, "results/mtcars.xlsx")
cloud_drive_spreadsheet_autofit("results/mtcars.xlsx")
}