| sheet_remove | R Documentation |
Remove a sheet from an xlsx workbook, deleting the worksheet XML, its relationship file and the content-type override.
sheet_remove(x, sheet)
x |
rxlsx object |
sheet |
name of the sheet to remove |
the rxlsx object (invisibly)
wb <- read_xlsx()
wb <- add_sheet(wb, "kept")
default_name <- sheet_names(wb)[1]
wb <- sheet_remove(wb, sheet = default_name)
print(wb, target = tempfile(fileext = ".xlsx"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.