View source: R/range_read_cells.R
range_read_cells | R Documentation |
This low-level function returns cell data in a tibble with one row per cell.
This tibble has integer variables row
and col
(referring to location
with the Google Sheet), an A1-style reference loc
, and a cell
list-column. The flagship function read_sheet()
, a.k.a. range_read()
, is
what most users are looking for, rather than range_read_cells()
.
read_sheet()
is basically range_read_cells()
(this function), followed by
spread_sheet()
, which looks after reshaping and column typing. But if you
really want raw cell data from the API, range_read_cells()
is for you!
range_read_cells(
ss,
sheet = NULL,
range = NULL,
skip = 0,
n_max = Inf,
cell_data = c("default", "full"),
discard_empty = TRUE
)
ss |
Something that identifies a Google Sheet:
Processed through |
sheet |
Sheet to read, in the sense of "worksheet" or "tab". You can identify a sheet by name, with a string, or by position, with a number. Ignored if the sheet is specified via |
range |
A cell range to read from. If |
skip |
Minimum number of rows to skip before reading anything, be it
column names or data. Leading empty rows are automatically skipped, so this
is a lower bound. Ignored if |
n_max |
Maximum number of data rows to parse into the returned tibble.
Trailing empty rows are automatically skipped, so this is an upper bound on
the number of rows in the result. Ignored if |
cell_data |
How much detail to get for each cell. |
discard_empty |
Whether to discard cells that have no data. Literally,
we check for an |
A tibble with one row per cell in the range
.
Wraps the spreadsheets.get
endpoint:
range_read_cells(gs4_example("deaths"), range = "arts_data")
# if you want detailed and exhaustive cell data, do this
range_read_cells(
gs4_example("formulas-and-formats"),
cell_data = "full",
discard_empty = FALSE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.