Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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
18 - Pollux

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
18 - Pollux

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.

LiuZhang
9 - Comet

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