Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Password Protected Input File

sgaryali
8 - Asteroid

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-

sgaryali_0-1635329120500.png

 

I have never worked on R programming and I don't have any idea how it works

Can someone please help me.

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

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 : )

 

 

sgaryali
8 - Asteroid

sgaryali_0-1635335500296.png

 

atcodedog05
22 - Nova
22 - Nova

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:

atcodedog05_0-1635335825276.png

 

Hope this helps : )

 

sgaryali
8 - Asteroid

sgaryali_0-1635336001714.png

thank you for hep but still getting some other type of error

atcodedog05
22 - Nova
22 - Nova
atcodedog05
22 - Nova
22 - Nova

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 : )

JAB95
7 - Meteor

Has anyone been able to run this with a .xlsx file, where you need to specify a sheet name?

 

Thanks

Labels