We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to create an output such that it adds a new row to an existing Excel sheet ?

Gandalf_NotGrey
8 - Asteroid

I am building a workflow, which will run once, each day. Output in .xlsx format.

The workflow creates one row of data on each run, and I want this row to be added below the previous day's data.

Also, a new excel file, in the format of 'Month-Year' (January-2023) has to be created, on the beginning of each month.

 

So, for example - On January 1st 2023, the workflow runs and checks if there already exists an excel file by the name 'January_2023'. When such a file does not exists, the workflow will create this file and will then put the output row in that file. When this workflow runs again on January 2nd, it will check and see that a file 'January_2023' already exists. So, this time it will just paste the output below the existing data in the file that was created earlier.

 

I tried doing this, using a combination of Block until Done and Test tool.

In the attached picture, in the top part of the workflow, I am checking if today is the first of a month and if yes, that test passes and the 2nd anchor of Block Until Done Works. And in the bottom part of the workflow, I am checking if today is not first of a month and if yes, that test passes and the 2nd anchor of Block Until Done Works.

Unfortunately, this logic didn't work. 

 

Any help will be much appreciated.

Rajat_BNYM_0-1674213100339.png

 

2 REPLIES 2
davidskaife
14 - Magnetar

Hi @Gandalf_NotGrey 

 

In my opinion you've made this more complex than it needs to be. Try something like this:

DavidSkaife_0-1674216603728.png

 

I've used a Text Input tool as an example, but using the DateTimeNow tool append the date to your data, and use a filter to check if that matches the first of the month you're in when the workflow runs. This can then be filtered off as True and create the output file, or if False it appends to the existing output file.

 

you'll need to build in logic that creates the file name and so forth, but assuming you're already doing that in your original workflow.

Gandalf_NotGrey
8 - Asteroid

Thanks @davidskaife This worked perfectly.

Labels
Top Solution Authors