Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Tab to be created in File with only headers if there are no records in that tab

joshikalyani
8 - Asteroid

Hi,

 

I'm working on 2 input files.A & B.

Took lookup & if records are matching then are saved in Matched Tab, If records are not matched then those should be in if different tab in Same XLSX file,

In the output i need 5 tabs, 

1. Total Records of File A

2. Total records of File B

3. Matched records between A & B

4.Records left in A

5. Records left in B

 

what i'm looking is, if there are all records matched from file B then, tab "Records left in B" should be with Headers only and   not records

 

Workflow i've creatd is showing the previous file run records in "Records left in B" tab although there should be no records in that tab.

 

I've checked many solutions but i've multiple tabs as output, applying that logic in every output tool will be time consuming

 

My workflow is like

The output file i've created with different tab, Tabs created with Formula tab having same filepath - any changes required here to avoid saving output of previous run?

 

Also Need to create Summary of those tabs also.

 

Attached Sample workflow, & Input file with scenario can paste in text input of my attached workflow

 

 

1 REPLY 1
fluteman
9 - Comet

The join tool is a clever way to mark the mismatches; you need to unionize them before applying the STOP tool.

 

The prongs of a STOP tool forces the sequential use of the workflow; so you can save to the same file without throwing a read-only message.

 

I took your file and split it into File A and File B attached

 

FileA and FileB are of the same format but contain differences.

 

File A:

 

IDValue
101ABC
102XYZ
103PQR
105LMN
110STU
120

CDE

 

File B:

 

IDValue
99YYY
102XYZ
103PQR
105LMN
110STU
130

XXX

 

When you choose your destination file, it will prompt you to replace the file - choose OK; but on the configuration of the tool:

 

Configuration.PNG

 

Choose Output Options : Overwrite Sheet or Range

FileFormat = xlxs

Your path to the file and tab will have this syntax : C:\Users\...\Downloads\Combined_File.xlsx|||FileA only

 

For the subtotals, you can nest a STOP tool within the STOP tool - if you need more tabs - add them to the Combined_File.xslx beforehand and reference them in the same way we have done above. You would use preceding aggregation tools on an unfiltered dataset to perform the high level calculations. Let me know if this points you in the right direction.

 

I can also add to the attached solution with the subtotal part if you are still stuck.

Labels