![]() ![]() Import_Full <- xl.read.file(File, xl.sheet = SheetName, password = PW)Īlthough that appears to work if there isn't a password (i.e. I have also used xl.read.file to read password protected files like this: PW <- rstudioapi::askForPassword(paste("Password Protected File: ", File )) However, the excel_sheets function apparently can't handle password protected files. SheetName <- grep(SheetNameGrep, excel_sheets(filename), value = TRUE) compare a grepped part of the possible sheet names against the sheet names detected in the file using excel_sheets): SheetNameGrep <- "otal|Sum|ums" I would also like to be able to detect if an excel file requires a password (so I could modify my generic script to read & alter the data to be able to prompt only IF a password is required).įor non-password protected files I have used something like this (i.e. could be "Total" or "totals" or "Sums", etc.) and the sheets are not in the same order in each file so I can't directly use the sheet order alone. I receive some password protected excel (.xlsx) files which often have slightly different sheet names (e.g. Is there a way to detect the sheet names in password protected excel file? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |