Alteryx Designer Desktop Discussions

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

Clearing Data in Template before Overwrite

pmelikian
7 - Meteor

Hello,

 

I have a workflow that overwrites data within a .xlsx template. The overwrite works fine but I am having issues when the data that was previously there is larger than what it is being overwritten (see example senerio below). Is there a way to clear a data range before it gets overwritten? or possibly fill in the remaining lines with null values?

 

Example: Say there was 10 lines of data on a template and I run the workflow and overwrite the file with new data that is only 5 lines. I am still seeing 10 lines of data. 5 lines of new data + the bottom 5 from the previous dataset that did not get overwritten. 

 

Any advice is appreciated here.

 

thanks

 

Paul 

22 REPLIES 22
dhanyaantonyp
5 - Atom

Hi ,

When I import its downloading as .yzxp and not able to get yxmd. 

dhanyaantonyp
5 - Atom

Got it. Thanks Luke

pozzyal
6 - Meteoroid

@luke_c Thank you for this! I'm in fact already using template files, I copy all 20 (1 per country) to a folder and run it, over-writing the old data. This works, but what I needed was a way to rename the files, and/or do the copying automatically, rather than manually. I'm thinking I can figure out the run tool easily enough, given what you've provided here - thanks again!

gaitonde25
7 - Meteor

Hi @Luke_C , Could you please share the .bat file also for copy and rename

Luke_C
17 - Castor

@gaitonde25 there are no .bat files to share, the workflow i posted creates them on the fly in the temp folder

gaitonde25
7 - Meteor

Hi @Luke_C , what will be the command in %temp%.Copy.bat and %temp%\Rename.bat files.

Luke_C
17 - Castor

Hi @gaitonde25 The formula tool in each container creates the command.

gaitonde25
7 - Meteor

Hi @Luke_C , I have attached both files here. The wf will generate output file on each run. So we want to format the excel file as output(attached file). Could you please create a sample workflow

Luke_C
17 - Castor

Hi @gaitonde25 is there something specific about the sample workflow I posted that's not working? Most people have been able to adapt it to meet their needs. I'd be happy to address specific questions but I don't have time to build a workflow from scratch for you. 

gaitonde25
7 - Meteor

@Luke_C i have changed both the input, output file and getting that error 

gaitonde25_0-1659445940837.png

 

.Error: Run Command (15): The external program "%temp%\Rename.bat" returned an error code: 1

Labels