Alteryx Designer Desktop Discussions

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

How to remove old records when output to a range while the list gets short

JokeFun
8 - Asteroid

I used "Overwrite sheet or range" option in the Output tool, while setting up the range like B:L in one of the sheets in the xlsx file. Everything goes fine until in one run I got a result list shorter than the previous and the old records still remains in the sheet. 

Take an example,

in Run 1 I have records

A

B

C

in Run 2 I have records

D

E

But in the Run 2 Output file, I see

D

E

C

 

I dont know how to tackle this problem as I need to keep the format in the output template and use this Overwrite range option.

3 REPLIES 3
PhilipMannering
16 - Nebula
16 - Nebula

Overwrite will keep all the records that aren't filled. Perhaps one solution would be (if you knew the maximum data stored) add null records to overwrite all previous data. You could do this with a Generate Rows and Join (on record position). 

 

Alternatively you could use the Reporting Tools - set the formatting in the Table tool and use the Render tool to create the xlsx with formatting.

 

Interested to hear if there's a better solution though.

messi007
15 - Aurora
15 - Aurora

Hello,

 

Please see below :

 

messi007_0-1605086268552.png

Attached the workflow 🙂

 

You can use VBS as well to that in order to delete previous data and then insert.

Hope that helps !

 

Regards,

JokeFun
8 - Asteroid

@messi007 @PhilipMannering Thank you for your great ideas! The Generate Rows solution works.

Labels