I was hoping someone could give me some pointers how to do this. I have multiple xlsx files in a directory that I'd like to convert to csv and then combine in one csv. I can do this with regular xlsx with the code below, but now I have to be able to read xlsx files that are password protected. Any ideas how I'd get around that?
library(rio)
library(plyr)
##LOAD, CONVERT AND COMBINE TO CSV
#convert all xlsx to csv
xls <- dir(pattern = "xlsx")
created <- mapply(convert, xls, gsub("xlsx", "csv", xls))
unlink(xls)
#combine csv files in directory
combined_ll <- ldply(list.files(), read.csv, header=TRUE)
They all have the same password, so in theory I should be able to read and unlock each file as it converts them. Any pointers would be so appreciated.