Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parse string as row + combine multiple XLS worksheets

271828
8 - Asteroid

To start, here's my data structure. Each month I receive ~20 files that look like the below. 4 tabs, identical schema, 4~25 records.

 

colorado970_0-1583943956079.png

 

I need to extract the business unit (QQQ) from each sheet (it's the same for each workbook). In theory I could take this from any string that contains it, including the file name, but it's only in a consistent format in cell A1.

 

I then need to combine all worksheets/workbooks.

 
 

Attached is my workflow that can do either part (combine, or split BU) separately but I can't figure out how to join them together.

 

colorado970_1-1583950930587.png

 

This is what I want the combined output to look like (and what Container 2 outputs for a single sheet):

 
 
 
 
 
 
 
 
 
 

colorado970_0-1583950899517.png

 

 

Container 1 combines all workbooks in a specified directory.

 

 

 

 

 

2 REPLIES 2
DavidP
17 - Castor
17 - Castor

Hi @271828,  this is how I would do it.

 

I only made 1 xls test file, so changed the sheets in the text input tool, but built it to work for multiple files and multiple sheets.

 

You'll see that I modified the formula tool to create 2 versions of the fullpath. The first loads the cell range A3:C from the file, which represents the data section of my test file. The second only loads cell A1.

 

I then have to extract both the filename and sheetname for the relevant dataset and use both as the join condition to add the Business Unit to all the rows of each dataset for each file and sheet.

 

Let me know if this works for you.  As before you'll have to change the template file in the dynamic input as well as the folder path in the browse tool. 

 

You'll also have to update the cell range in the formula tool to load your range of data. A3:C basically means cell A3 to the last row in column C.

 

DavidP_1-1583968751683.png

 

 

271828
8 - Asteroid

Thanks again David! I probably should've added this to the original thread, but I didn't want to derail the topic. 

 

For anyone else, @DavidP created the workflow in container 1.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Change-Input-Tool-directory-based-on-u...

Labels