How to get excel filename with the data?
- 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
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.
Please help.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @HW1
1) Yes, you just need to select this in Options:
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"
More details are here: https://help.alteryx.com/20212/designer/input-data-tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @HW1
You can configure the "Output filename as field" in the input tool or dynamic input tool to get the filename or fullpath.
Edit : Same as above 😅
Hope this helps 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@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.
