The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Input protected password "Error: Bad Variable"

charlottepetit
5 - Atom

Hi all,

I've been using the workflow provided in this link:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-open-excel-with-a-password/td-p...

 

However, when running it, the attached error message appears "Error: Bad variable type."

I have checked the data type of my password, it is V_String" like in the workflow.

R (108) Error Bad Variable.PNG

5 REPLIES 5
charlottepetit
5 - Atom

Now it seems that I have another error message >

charlottepetit_0-1620772814495.png

 

My code is however quite short. To R coders, any ideas?

charlottepetit_1-1620772878857.png

 

apathetichell
20 - Arcturus

Can you swap "lapply" for "apply" in your code? original version is

output <- lapply(excel_data, as.character)

charlottepetit
5 - Atom

Done, no change to the output unfortunately. I'm thinking it might have something to do with the formula xl.read.file?

charlottepetit_0-1620773582025.png

 

apathetichell
20 - Arcturus

I think it might be an issue with the underlying package - I implemented it in a test case. Worked fine with no protection. Worked fine with some protection. The more protection options I used the more errors popped up. I haven't had the time to see if it's re-creatable outside of Alteryx as an error or if the error is Alteryx/output specific.

leozhang2work
10 - Fireball

A bit of old post to comment, but as I am currently doing same thing, I will respond to it.

The initial reference to https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-open-excel-with-a-password/td-p... should work fine.

 

I've got the same error, turns out I named by column names wrong.

For yours, I guess try to drop write.res.password if you don't have a second password for editing (or different one)

 

For the later pictures, try to drop lapply and as.data.frame first to see.

My guess is lapply casted it to a list, then a data frame probably convert it without header, hence the error.

Labels
Top Solution Authors