I have a folder of daily report in Excel XLSB format, now I am trying to import all files in the folder and bind into one data frame in R. I have experience with importing a folder of multiple CSV files into R, the code as below:
library(tidyverse)
setwd("C:/Folder_Path")
file_path <- list.files(pattern="*.csv")
combined_df <- lapply(file_path, read_csv) %>% bind_rows
I tried to implement this code into this case to import XLSB files, the spreadsheet I need is "Sheet1" and the header starts from row #4, therefore i created a custom function to do this:
library(tidyverse)
binary_import <- function(x){
readxl::read_excel(x, sheet="Sheet1", skip=3)}
setwd("C:/Folder_Path")
file_path <- list.files(pattern="*.csv")
combined_df <- lapply(file_path, binary_import) %>% bind_rows
Then i noticed that readxl package does not support xlsb extension. Is there any workarounds available for me to complete the job instead of manually converting the files into csv format because there are hundreds of files.
Your code works except for the xlsb part. You could use excel.link package for reading xlsb