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

Creating 2 Sheets (with different names) in 1 outcome file (excel)

abae
7 - Meteor

Hello,

 

I was wondering if there is a way to create 1 excel outcome file, but with 2 different sheets.

 

As per my workflow below, I have an excel output file that is created called "Final Template Output.xlsx". It will be created in a sheet called "Actuals".

However, I was wondering if there is a way to somehow connect the 2nd data file below into this same excel output, but create it in a 2nd sheet called "Version". It has a different data info/set.

For the 2nd file, I was able to create until "select", and just have to connect to the above "Final Template Output.xlsx". 

 

Thank you.

 

abae_0-1672408481897.png

 

15 REPLIES 15
Felipe_Ribeir0
16 - Nebula

Hi @abae 

 

You could do it modifying your workflow to be like this:

Felipe_Ribeir0_0-1672409728677.png

Just be sure to:

Output tool: use the option overwrite sheet or range

append tool: use the option allow all appends, and remove columns from the first dataset from the selection

 

 

RogerS
Alteryx
Alteryx

Yes, you can do this.  For your top input use the run command tool for the output.   in the configuration write tab enter your first excel sheet.  For the bottom input section create a dummy input with a single record.  now use a join tool to join the "fake" date coming out of run command tool  (join on any fields with the same data type and have no matches)  to the bottom.  because it's fake data nothing will match and you will use the either the R or the L unmatched data depending on how you set up your join.  

 

This will control the order of operations and keep both sheets from accessing the output at the same time.

 

Let me know if you have any questions.

 

Please mark as accepted solution if this helps.

RogerS
Alteryx
Alteryx

This will work but could possible error if the first output is large and takes a few minutes to write and the bottom data stream is small.  if you want to absolute prevent this see my post below.  For the run command tool you can output the top data set and then just read in the first record of the data set when created and then use your method.  Just replace the block until done.

Learner09
8 - Asteroid

@abae Please see the attached flow, hope it will solve your problem

abae
7 - Meteor

Hello Felipe_Ribeir0,

 

thank you for the response. However, could you please let me know what function that hand shape is? I am trying to find it, but can't :(

 

Thank you.

Felipe_Ribeir0
16 - Nebula

Hi @abae 

 

It is the Block Until Done. It does not require any further configuration, just do it like it was made on my previous print.

 

Felipe_Ribeir0_1-1672410455282.png

 

 

abae
7 - Meteor

Hello Mayank09,

 

thank you for the below.

 

I see that you used Joint, formula and then select, but may I ask you for the purpose of formula and select step?

 

Thank you.

Learner09
8 - Asteroid

@abae First two formulae create columns so that flow identifies the test name at the end, Joint tool clubs both the datasets, then the formulae tool read the filenames with the location where you want to save the output, and the last select tool to remove the test name. The last is the output with the same location that we used in the formula tool. Also, you have to do the below setting on the output tool. Please mark it as an accepted solution if this helps.

 

Mayank09_0-1672411400518.png

 

abae
7 - Meteor

Hello Felipe_Ribeir0 once again for your help!

I am trying all the solutions from the reply, but wanted to verify something on your suggested workflow.

 

The attached excel file is the end-result file that I am hoping to get (ultimate goals.xlsx), but I am not getting everything all at once :(

 

I only get 1 file with the 2 inflow sheets combined (what I get..) called "Test1.xlsx".

 

Could you please help what I didn't do that you are suggesting? 

 

 

Labels