Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Reuse the same Excel input file as Output

grizly120
8 - Asteroid

Hi - I have setup a process on the Alteryx Server to allow a user to load their Excel file with certain parameters.  I would like to use this same Excel file the user selected as the output, but separate tab.  Is this possible?  I can capture the file name and path from the input tool but not sure how to then tell the output tool to use the same file for final write out.  

3 REPLIES 3
gabrielvilella
14 - Magnetar

If you don't care about formatting, you can just recreate the first sheet again and add the other one. If you do care, you will need to have a template being published with the workflow that you can reference in the workflow, duplicate it, change the name, add the data to the first sheet and then create the second one. It's a complex solution. 

WesCannon
Alteryx Alumni (Retired)

Hi @grizly120,

 

Yes, that is definitely possible in Alteryx. You would use the fields where you have captured the file name and path to create a new path in a formula tool. You would then utilize the "Take File/Table Name From Field" option in the Output tool to write the data to a new tab of the same file. I've provided an example workflow that demonstrates this capability.

 

WesCannon_0-1681831631396.png

 

Thanks,

Wes

SeanAdams
17 - Castor
17 - Castor

Hey @gabrielvilella 

 

I think that there's 2 different questions here

- can you do it - yes, and you need to be aware of file locking so that if the file gets big you don't end up tripping over the same process when writing.    There are ways round this, but they get complex quickly (Block until done is a good start, but not always bulletproof)

- Should you do it - this is more complex.    If you pick up a file and enrich it - then you end up in a situation where if the job fails mid-way through, then you will end up in a mixed / indeterminate state.

 

What I would do is to have different steps on this process - the input file is your raw file, and then the later steps are enriched steps - and if you pump these out into different tables / files it's easier to recover; debug; trace progress etc.