Alteryx Designer Desktop Discussions

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

Dynamic File Input That Accepts Multiple File Types

elsastark
10 - Fireball

Hello Community!

 

I am currently building out a process where the data that needs to be put through this workflow comes to us in different file types (Excel, CSV, TXT, etc.)

 

I want to build the workflow in a dynamic enough way that my workflow will handle these different file types without too much trickiness in the code. I'm also manipulating some of the Format options using a config table (For File ABC start the Import at line 9 for example). I have it working smoothly with Excel files for now, but need to start making it work with .txt and .csv file types. 

 

Any tips and tricks that may be helpful as I try to code this up? Much appreciated!

3 REPLIES 3
Emmanuel_G
13 - Pulsar

Hi @elsastark ,

 

To exactly answer your question, can you give example files and what you want to do with each one with comments in a workflow for testing?

 

 

SPetrie
12 - Quasar

I use a macro that calls a series of macros for my different file types. 

Create one macro for each file type that works the way you want it, and then you can make another macro to call the appropriate one based off of file extension.

I use condition tools to enable/disable the containers that contain the macros that I want my data to pass through. I use control parameters to pass through the values for any configurable selections but those could be hard coded if they dont really change.

SPetrie_0-1657573943365.png

 

Samantha_Jayne
Alteryx
Alteryx

Hey @elsastark 

 

I would recommend reviewing Macros that already exist and then building it out. like @SPetrie mentions above. Another great example would be this one. Input-Batch-Macro-AKA-the-Extra-Dynamic-Dynamic-Input this enables reading of many files at once, but may have some of the features you are looking to achieve.

Samantha Clifton
Alteryx
#alteryxrocks
Labels