saveAsExcel | R Documentation |
saveAsExcel
will save one or more grids in an Excel file (.xlsx
).
saveAsExcel(x, file, format = "wide", sheet = NULL, default_sheet = "grid")
x |
A |
file |
File path. Suffix must be |
format |
Two output formats are supported: |
sheet |
Vector of sheet names with same length as |
default_sheet |
Default sheet name to use if not supplied in |
Invisibly returns file path.
importExcel()
, saveAsWorksheet()
# save one grid in wide format (default)
file <- tempfile(fileext = ".xlsx")
saveAsExcel(boeker, file)
## Not run:
browseURL(file) # open file, requires Excel, may not work on all system
## End(Not run)
# save one grid in log format
file <- tempfile(fileext = ".xlsx")
saveAsExcel(boeker, file, format = "long")
## Not run:
browseURL(file)
## End(Not run)
# save a list of grids
file <- tempfile(fileext = ".xlsx")
l <- list(boeker, feixas2004, bell2010)
saveAsExcel(l, file)
## Not run:
browseURL(file)
## End(Not run)
# pass some sheet names (2nd with named sheet)
file <- tempfile(fileext = ".xlsx")
l <- list(boeker, "feixas' grid" = feixas2004)
saveAsExcel(l, file)
## Not run:
browseURL(file)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.