Read excel Files and sheets from folder
- 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,
I have around 15 files with dates in one folder. In each excel file I have around 50 sheets.
I have to read 1 excel file and its particular 30 sheets using sheets name.
I want to repeat this process for all 15 excels. After that, I want to append the sheets one below one with file name in 1 column.
Output I want --> only 1 excel file for all 30 sheets. Basically, appended data sheet wise for all 15 files along with one column to identify the source of data.
- Labels:
- Custom Tools
- Input
- Output
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Do all of the sheets in all of the files have exactly the same layout?
If yes, you can use a Directory tool that feeds into a Dynamic Input tool.
If not, you'll need a batch macro to bring in different layouts, then use a Union tool to combine the Sheets.
To get the source of data (file name and sheet name), whenever you use an Input Data tool, use the configuration option Output File Name as Field = Full Path
 
Check out this post:
The Ultimate Input Data Flowchart
Community > Designer > Designer Knowledge > The Ultimate Input Data Flowchart
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...
And here are some posts about Dynamic Input, and reading multiple Excel files / sheets:
this solution requires all input Sheets to have the same layout
see response from LordNeilLord: Alteryx Certified Partner
I built you a little workflow to do this.....the first Macro reads all of the sheet names and the second macro imports those sheets into a single file
Directory.yxzp
Input multiple xlsx files and union them
Read multiple sheets from multiple Excel files
using a batch macro to import multiple sheets from excel
Community > Designer > Browse Knowledge > CS Macro Dev: Reading in Multiple Files with Different Field Schema - Batch Macro
How to Input Multiple Sheets from Multiple Excel Files
Chris
