Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Select specific worksheet using Macro

pokhan27
8 - Asteroid

Hi Expert, 

i have one input file but i want to have a macro that will give a user  to select the worksheet

for example: 

i have two sheets in a workbook and i want to create a macro that allows me to select the worksheet

 

pokhan27_0-1628868434077.png

 

16 REPLIES 16
atcodedog05
22 - Nova
22 - Nova

Hi @pokhan27 

 

Macro would be something like this

 

atcodedog05_0-1628868841182.png

 

And workflow would be something like

atcodedog05_1-1628868880031.png

 

Hope this helps : )

 

pokhan27
8 - Asteroid

hi Thank you as always but you have hard coded the sheet name. is there any way to give user an authority to select the work sheet 

like below: 

pokhan27_0-1628872250960.png

you can see two input file from same source  which have two different worksheet. QTD and YTD. I want an app which gives me an option to select the worksheet 

 

hope you get that

atcodedog05
22 - Nova
22 - Nova

Hi @pokhan27 

 

Are you looking for a text box.

 

If you are saying drop down should automatically update with options only way is chained app. Because normal app wont change the interface options unless its run has a workflow once.

atcodedog05
22 - Nova
22 - Nova

Hi @pokhan27 

 

It would be something like this.

 

App1: Load sheet names

atcodedog05_0-1628873064111.png

 

App2: Let user select sheetname

atcodedog05_1-1628873077714.png

 

use this guide for downgrading the packaged workflow if needed.

https://community.alteryx.com/t5/Engine-Works/Making-Workflows-Apps-amp-Macros-Backwards-Compatible/... 

 

Hope this helps : )

pokhan27
8 - Asteroid

hi 

this is my workflow. If i select QTD than the it goes to the QTD calculation and if i select YTD than YTD sheet should be selected

 

pokhan27_1-1628873739395.png

atcodedog05
22 - Nova
22 - Nova

Hi @pokhan27 

 

You are in the right direction. Here is a simple app workflow how you can do it.

 

QTD:

atcodedog05_0-1628874195129.png

YTD:

atcodedog05_1-1628874214728.png

 

Combine the above scenarios of sheet selection and containers. I kind of feel your usecase seems to be quite more complex 😶

 

Hope this helps : )

pokhan27
8 - Asteroid

i did came with this solution but am looking to have only one input file where user can select the sheet name

 

pokhan27_0-1628874624097.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @pokhan27 

 

Wont the user be selecting the sheet in file browse tool connected to input tool 🤔

 

Can you share a more larger and clear snapshot. I am not able to take a good look into it.

pokhan27
8 - Asteroid

just having worst case case scenario, don't want user to mix QTD data in YTD calculation  😉

Labels