Skip to content

Commit 1282a9c

Browse files
committed
retain ods_sheets for now, because readtext needs that
1 parent 22e80e5 commit 1282a9c

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export(getNrOfSheetsInODS)
44
export(get_num_sheets_in_ods)
55
export(list_ods_sheets)
6+
export(ods_sheets)
67
export(read.ods)
78
export(read_ods)
89
export(write_ods)

R/readODS.R

+7
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,10 @@ list_ods_sheets <- function(path) {
309309
res <- .parse_ods_to_sheets(path)
310310
return(sapply(res[[1]], function(x) xml2::xml_attr(x, "table:name", res[[2]])))
311311
}
312+
313+
#' @rdname list_ods_sheets
314+
#' @export
315+
ods_sheets <- function(path) {
316+
warning("ods_sheets will be depreciated in the next version. Use list_ods_sheets instead.")
317+
list_ods_sheets(path)
318+
}

man/list_ods_sheets.Rd

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test_legacy.R

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ s_read.ods <- function(...) {
1212
})
1313
}
1414

15+
test_that("ods_sheets", {
16+
file="../testdata/test.ods"
17+
expect_warning(ods_sheets(file))
18+
})
19+
1520
test_that("getNrOfSheetsInODS", {
1621
file="../testdata/test.ods"
1722
expect_warning(getNrOfSheetsInODS(file))

0 commit comments

Comments
 (0)