Is there any way in R to import list or number of worksheets of xlsb excel file? I know that there is similar function for xlsx (excel_sheets) but it doesn't work for xlsb.
Asked
Active
Viewed 268 times
1 Answers
1
With the {readxlsb} package, you can make a "trick" with the debug
parameter of its main function using any worksheet (label or index at sheet
parameter) or named object (at range
parameter) from the workbook.
library(readxlsb)
src_path <- "directory/file.xlsb" # your filepath
df <- readxlsb::read_xlsb(
src_path,
sheet = 1, # got 1st worksheet, e.g.
debug = TRUE
)
sheets <- df$env$sheets
# number of worksheets
print(nrow(sheets))
# their names
print(sheets$Name)

pseudorandom
- 142
- 1
- 1
- 10

Filippe O. Gonçalves
- 317
- 1
- 7