Alteryx Designer Desktop Discussions

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

Importing Multiple Files and File Types

kaca226_
6 - Meteoroid

Is it possible to simultaneously import multiple files from a folder that are either Excel, text, or CSV files? I've created batch macros to read in all Excel files or all CSV files, etc., but was wondering if there is a solution to bring them all in at once without separate inputs, then a Union tool.

 

Please let me know if you need any clarification or have any questions.

 

Thanks in advance!

7 REPLIES 7
apathetichell
19 - Altair

YES. You need to build a second action tool from your control panel which parses out the file type (.xlsx or .csv) and modified the file-format parameter in your input data for the proper config (25 for .xlsx, 0 for .csv - if memory serves me.)...

 

Take a look at some solutions here:

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-180-Thousand-File-Challenge/td-p/461356

 

 

 

kaca226_
6 - Meteoroid

Thank you for your reply. One final question - Is there a configuration for a pipe-delimited text file? I see tab and CSV on the lists, but no pipe-delimited and the macro will not read in my pipe-delimited text files.

 

Thanks for your help!

apathetichell
19 - Altair

| delimited is the same format as .csv with a different delimiter. toggle the delimiter to | (or \| if needed) in the input data tool. tab delimited is \t.

 

 

kaca226_
6 - Meteoroid

I'm using a Directory tool with a Batch Macro to read in 24 files. 12 are Excel files and 12 are pipe-delimited text files. Currently, my Batch Macro has 2 Control Parameters - one to update the the Full Path and the other to update the File Types. It did not read in the pipe-delimited text files. Is there a work around on the macro to allow for the macro to read them in? Or do I need to do 2 separate inputs and union them? Attached is a screenshot of my workflow.

 

Thanks,

 

 

Alteryx Example.png

Tating22
5 - Atom

@kaca226_ Hi, good day!

 

I have also multiple file types (.xlsm, .xls, .xlsb, and .xlsx) and sheets that I want to read it once in the Alteryx. Can I ask, what did you do in your Batch Macro with 2 control parameters? I am not very familiar with the tool. Hoping for your response.

 

Thanks! 

kaca226_
6 - Meteoroid

Hi @Tating22,

 

For the macro to work correctly, you need to tell it to update for each file in your directory and also update for the type of file, hence the two control parameters. 

 

Here is a Challenge Alteryx posted that utilizes a macro in this manner:

 

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-180-Thousand-File-Challenge/td-p/461356

 

I have also attached a sample workflow from @David-Carnes that shows how it should be set up. You can view the macro he used within the workflow.

 

Hope this helps!

David-Carnes
12 - Quasar

Glad I could help, lol.

Labels