as_workbook | R Documentation |
as_workbook()
converts Tatoo_table
or Tatoo_report
objects directly
to openxlsx Workbook
objects. For information about additional parameters
please refer to the documentation of write_worksheet()
, for which
as_workbook()
is just a wrapper. Additional possible function arguments way
vary depending on which Tatoo_table
you want to export.
save_xlsx()
is a wrapper for saving a Tatoo_table
directly
to an ‘xlsx’ file.
view_xlsx()
is another wrapper for viewing a Tatoo_table
"s
‘xlsx’ representation in your favorite spreadsheet program (powered by
openxlsx::openXL()
).
as_workbook(x, ...)
## Default S3 method:
as_workbook(x, sheet = 1L, ...)
## S3 method for class 'Tatoo_report'
as_workbook(x, ...)
save_xlsx(x, outfile, overwrite = FALSE, ...)
view_xlsx(x, ...)
x |
A |
... |
Additional arguments passed on to |
sheet |
The worksheet to write to. Can be the worksheet index or name. |
outfile |
Path to the output file |
overwrite |
If |
as_workbook()
returns an openxlsx Workbook
object.
save_xlsx()
returns the path to the saved ‘.xlsx’ (invisibly).
view_xlsx()
opens an external program and returns NULL
(invisibly).
Other xlsx exporters:
write_worksheet()
## Not run:
dat <- data.frame(
Species = c("setosa", "versicolor", "virginica"),
length = c(5.01, 5.94, 6.59),
width = c(3.43, 2.77, 2.97)
)
# Assign metadata to convert dat to a Tagged_table
title(dat) <- "Iris excerpt"
footer(dat) <- "An example based on the iris dataset"
# Convert to Workbook or save als xlsx
wb <- as_workbook(dat)
save_xlsx(dat, tempfile(fileext = ".xlsx"), overwrite = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.