Why can't openxlsx2::wb_get_sheet_names()
do what openxlsx::getSheetNames()
did?
#775
-
I get what it does now, but this does not make the switch from example_file <- system.file("extdata", "readTest.xlsx", package = "openxlsx")
openxlsx::getSheetNames(example_file)
#> [1] "Sheet1" "Sheet2" "Sheet 3" "Sheet 4" "Sheet 5" "Sheet 6" "1"
#> [8] "11" "111" "1111" "11111" "111111"
openxlsx2::wb_get_sheet_names(example_file)
#> Error: wb must be class wbWorkbook or R6 Created on 2023-08-30 with reprex v2.0.2 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @SchmidtPaul , the simple solution is "don't switch". We have added many different tweaks all over the place to provide a more consistent interface. Unfortunately there isn't always a one size fits all solution. We might add an internal |
Beta Was this translation helpful? Give feedback.
-
Alright, thanks. I think I'll simply stick to {readxl} for importing and {openxlsx2} for exporting then. |
Beta Was this translation helpful? Give feedback.
Hi @SchmidtPaul , the simple solution is "don't switch". We have added many different tweaks all over the place to provide a more consistent interface. Unfortunately there isn't always a one size fits all solution. We might add an internal
wb_load()
, but obviously it's nothing anyone else has had a need for and I'm a bit reluctant to blow up various functions with options not needed and therefore not well tested. But you can create yourself a quick wrapper function.