Alteryx Designer Desktop Discussions

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

Import Excel file from multiple folder and group folder

SH_94
11 - Bolide

Hi , 

 

Currently i plan to import all the file from the desktop as shown in the screenshot below. There are sub- folder files and sub-sub folder files under this files.

 

May i know how can i import the files with different sub-folder?

 

Jacob_94_0-1614849082373.png

 

30 REPLIES 30
jamielaird
14 - Magnetar

Hi @SH_94 ,

 

Use a Directory tool and configure it for the type of file you want to detect as well as ticking to include subfolders:

 

jamielaird_0-1614850754730.png

 

 

Then use the Dynamic Input tool to read in the files:

https://help.alteryx.com/current/designer/dynamic-input-tool

 

There is a good example workflow for Dynamic Input available as follows:

 

jamielaird_1-1614850700651.png

 

SH_94
11 - Bolide

Hi ,

 

Could you guide me on how to import it as it look complex and not sure how to import it.

 

 

Emil_Kos
17 - Castor
17 - Castor

Hi @SH_94,

 

I am a big fun of this macro. It will allow you to easily import many excel files at once:

 

https://gallery.alteryx.com/#!app/Read_All_Excel_Files/58dd51b3a18e9e18fca64172

SH_94
11 - Bolide

Hi @Emil_kos 

 

May i know how to use it ?Could you briefly explain how i import and replace the file?

pedrodrfaria
13 - Pulsar

Hi @SH_94 

 

See below for a brief tutorial on how to do this:

 

 

Here is the set up for the files, as you see we have a couple of sub folders to load. For this example I used xlsx files.

pedrodrfaria_0-1614859342886.png

pedrodrfaria_1-1614859349867.png

pedrodrfaria_2-1614859357356.png

 

In Alteryx we will load all the xlsx files with the directory tool, add to the Full Path the name of the sheet and use the macro attached with the workflow to load all the files.

pedrodrfaria_0-1614859768927.png

 

 

Directory:

pedrodrfaria_3-1614859433640.png

Formula:

For this case I knew all the files contained the same sheet name. If they don't, we can create a logic to load all the sheet names and then load all the files with all the different sheet names.

pedrodrfaria_4-1614859454628.png

 

Macro:

pedrodrfaria_5-1614859503406.png

 

Here you can see that we were able to load File 1 and File 2

pedrodrfaria_6-1614859515530.png

 

I attached the workflow.

 

This should give you a good idea of what you need to do.

 

Pedro.

 

 

 

 

SH_94
11 - Bolide

Hi @ pedrodrfaria

 

May i know how if this step is the same if i use CSV? 

 

Could you please guide me if there is different way of approach to do for CSV.

pedrodrfaria
13 - Pulsar

Hi @SH_94 

 

Attached an example with CSVs.

 

pedrodrfaria_0-1614860407929.png

 

SH_94
11 - Bolide

Hi @ pedrodrfaria

 

Thank you for your response.

 

May i know what should i do for the following step?

 

Should i choose my own destination file (the folder that i want to input ) or i just follow the package as shown below?

 

 

Jacob_94_0-1614860603293.png

 

pedrodrfaria
13 - Pulsar

Import everything, and in the workflow, in the Directory Tool, update the Folder Path to main folder you are trying to extract the files (the one that has all the folders/files inside of it

Labels