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.

Write to Excel

champ24
7 - Meteor

Is it possible to write multiple outputs from a single workflow to each individual sheet in excel? There are dependencies in a single workflow with multiple data sources. 

6 REPLIES 6
Per
11 - Bolide

Hi @champ24,

 

Yes, that is fortunately not too hard. The standard Output tool allows you to split data into separate sheets, however the description only mentions files and tables, so not too obivious. You just need a field to split data on (Field1 in my example). I have provided an example here, that you can probably work from. Otherwise, let me know 🙂

Per_0-1601535873008.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @champ24 ,

 

As @Per said its pretty easy to do it if its only writing to multiple sheets.

 

Here is a workflow for the task.

atcodedog05_0-1601536582623.png

I am reading from a excel file and outputting to the same excel as multiple sheets you can give destination as other excel file also.

 

Hope this helps : )

 

If this helps please mark it as a solution.

champ24
7 - Meteor

Thanks for the input guys. What I really meant was in the same workflow I have multiple outs being generated from various child workflows which are locking the file when writing to the excel. Getting cannot write due to Process being handled by another resource error. I may have to introduce a delay?

atcodedog05
22 - Nova
22 - Nova

Hi @champ24 

 

Yup have experienced that !

 

You check out block and until tool which might help out.

 

Or introduce delay using a python script sleep.

 

https://help.alteryx.com/current/designer/block-until-done-tool

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Block-Until-Done/ta-p/...

 

Hope this helps : )

 

If this post helps you please mark it as solution. And give a like if you dont mind.

KylePeterson
7 - Meteor

@champ24  You're able to leverage the Block Until Done Tool, that way only one output is occurring and not locking up the Excel workbook.

 

Additionally, if you have multiple documents you are inputting - you're able to leverage the Parallel Block Until Done Tool within the CREW Macros.  Here's a link to get the CREW Macros if you haven't done so already - http://www.chaosreignswithin.com/p/macros.html.

 

Good luck and have fun 🙂

jkell
7 - Meteor

I am wondering if the tool can be configured to overwrite only specific ranges with in each tab (the same range for each tab).

I am able to do this with the standard configuration of the Output Data tool ("C:\\test.xlsx|||Sheet1$a10:b20" ) when I am not writing to multiple tabs.

 

But when doing using dynamic method provided above, it is not working as expected, and each sheet is overwritten entirely each time. 

 

Any thoughts? Thanks!

Labels