Alteryx Designer Desktop Discussions

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

How to get excel filename with the data?

HW1
9 - Comet

Hi,

When you use the input data tool for an excel file, you can get the data from a sheet that you select.

Is there any way to get the file name as well for the data in a separate column?

 

I have a number of excel files connected to a union tool and to investigate the data, I need to know where its coming from hence, I would like to know where that exact row of data is sourced from.

For this, I would require to know the file name for that row.

Is there any way I can get that?

Right now I am not aware if such a functionality exists.

HW1_0-1626062662192.png

 

Please help.

Thanks.

4 REPLIES 4
KarolinaRoza
11 - Bolide

Hi @HW1 

 

To achieve this you can Dynamic Input Tool.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Dynamic-Input-Bring-in-Filename/td-p/1...

 

Regards, Karolina

ArtApa
Alteryx
Alteryx

Hi @HW1 

 

1) Yes, you just need to select this in Options:

ArtApa_0-1626069406898.png

 

2) If your Excel files of the same schema you may not need a Union tool. You can use either "*" or "?" in your Input data tool to read Excel files in one folder. For example, the below will read all files that start with "Smart_Tile"

ArtApa_1-1626069615909.png

 

More details are here: https://help.alteryx.com/20212/designer/input-data-tool 

atcodedog05
22 - Nova
22 - Nova

Hi @HW1 

 

You can configure the "Output filename as field" in the input tool or dynamic input tool to get the filename or fullpath.

atcodedog05_0-1626069753881.png

 

Edit : Same as above 😅

 

Hope this helps 🙂

 

HW1
9 - Comet

@ArtApa @atcodedog05 @KarolinaRoza  Thank you for your replies. I tried them all however I was dealing with xlsm files so the method did not work as the solutions posted above did not bring in sheet name.

The process I followed after going through a couple of examples is to use the directory tool and point the path to a formula tool. Formula tool needs to append the sheet name to the file and then the dynamic input tool. and then your process @ArtApa worked.

 

Thank you all for your help.

 

 

Labels