ropensci / readODS

Read ODS (OpenDocument Spreadsheet) into R as data frame. Also support writing data frame into ODS file.
https://docs.ropensci.org/readODS/
Other
55 stars 22 forks source link

Assign names of sheets ods #192

Closed chainsawriot closed 5 months ago

chainsawriot commented 5 months ago

via e-mail

I’m using the package readODS to write a list of data.frames to a ods-file. In principal this works great, but I’m not able to assign sheet names according to the names of the list. Is this option restricted to a single data.frame or is there a way so “rename” all sheets according to a vector or something else?

chainsawriot commented 5 months ago

Initial investigation

x <- list(notiris = PlantGrowth, notplantgrowth = iris)
y <- readODS::write_ods(x)

readODS::ods_sheets(y)
#> [1] "notiris"        "notplantgrowth"

testthat::expect_equal(readODS::ods_sheets(y), c("notiris", "notplantgrowth"))

Created on 2024-06-05 with reprex v2.1.0