簡體   English   中英

將xlsb文件的工作表列表導入R

[英]Import worksheet list of xlsb file into R

R 中是否有任何方法可以導入 xlsb excel 文件的列表或工作表數量? 我知道 xlsx (excel_sheets)有類似的 function 但它不適用於 xlsb。

使用 { readxlsb } package,您可以使用任何工作表(工作sheet參數中的標簽或索引)或命名 ZA8CFDE6331BD59EB2AC96F891 中的range的主要debug參數進行“技巧”。

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(length(sheets))

# their names
print(sheets$Name)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM