Dynamic File Input That Accepts Multiple File Types
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Dynamic Processing
- Input
- Macros
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Alteryx
#alteryxrocks
