Convert a cell_limits object to a cell range
as.range(x, fo = c("R1C1", "A1"), strict = FALSE, sheet = NULL)a cell_limits object
either "R1C1" (the default) or "A1" specifying the
cell reference format; in many contexts, it can be inferred and is optional
logical, affects reading and writing of A1 formatted cell
references. When strict = TRUE, references must be declared absolute
through the use of dollar signs, e.g., $A$1, for parsing. When
making a string, strict = TRUE requests dollar signs for absolute
reference. When strict = FALSE, pure relative reference strings will
be interpreted as absolute, i.e. A1 and $A$1 are treated the
same. When making a string, strict = FALSE will cause dollars signs
to be omitted in the reference string.
logical, indicating whether to include worksheet name; if
NULL, worksheet is included if worksheet name is not NA
length one character vector holding a cell range
rgCL <- cell_limits(ul = c(1, 2), lr = c(7, 6))
as.range(rgCL)
#> [1] "R1C2:R7C6"
as.range(rgCL, fo = "A1")
#> [1] "B1:F7"
rgCL_ws <- cell_limits(ul = c(1, 2), lr = c(7, 6), sheet = "A Sheet")
as.range(rgCL_ws)
#> [1] "'A Sheet'!R1C2:R7C6"
as.range(rgCL_ws, fo = "A1")
#> [1] "'A Sheet'!B1:F7"