Hi
I am trying to use password protected file as input
and i also followed post on the community - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-open-excel-with-a-password/m-p/...
But it is giving me error-
I have never worked on R programming and I don't have any idea how it works
Can someone please help me.
Hi @sgaryali
Remove # from the first line install.packages("excel.link") error might be because of the library not found. The first line installs the library.
Hope this helps : )
Hi @sgaryali
#1 is the connection name seems like the connection name got changed in place on #1 use #2 in the highlighted place.
Workflow:
Hope this helps : )
thank you for hep but still getting some other type of error
Hi @sgaryali
Try this code out. Enter the password where it says Enter password here
library("excel.link")
df <- read.Alteryx("#1", mode="data.frame")
filename <- as.character(df[1,"FullPath"])
excel_pwd <- as.character(df[1,"Enter password here"])
excel_data <- xl.read.file(filename, password = excel_pwd, write.res.password=excel_pwd)
output <- lapply(excel_data, as.character)
output <- as.data.frame(output)
write.Alteryx(output, 1)
Hope this helps : )
Has anyone been able to run this with a .xlsx file, where you need to specify a sheet name?
Thanks