Skip to content

Commit

Permalink
retain ods_sheets for now, because readtext needs that
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Jul 10, 2020
1 parent 22e80e5 commit 1282a9c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
export(getNrOfSheetsInODS)
export(get_num_sheets_in_ods)
export(list_ods_sheets)
export(ods_sheets)
export(read.ods)
export(read_ods)
export(write_ods)
7 changes: 7 additions & 0 deletions R/readODS.R
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,10 @@ list_ods_sheets <- function(path) {
res <- .parse_ods_to_sheets(path)
return(sapply(res[[1]], function(x) xml2::xml_attr(x, "table:name", res[[2]])))
}

#' @rdname list_ods_sheets
#' @export
ods_sheets <- function(path) {
warning("ods_sheets will be depreciated in the next version. Use list_ods_sheets instead.")
list_ods_sheets(path)
}
3 changes: 3 additions & 0 deletions man/list_ods_sheets.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tests/testthat/test_legacy.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ s_read.ods <- function(...) {
})
}

test_that("ods_sheets", {
file="../testdata/test.ods"
expect_warning(ods_sheets(file))
})

test_that("getNrOfSheetsInODS", {
file="../testdata/test.ods"
expect_warning(getNrOfSheetsInODS(file))
Expand Down

0 comments on commit 1282a9c

Please sign in to comment.