Alteryx Designer Desktop Discussions

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

Open, change, and save Excel files as the same filename

Katy_Holder-Vale
7 - Meteor

Hi,

 

I have a folder full of Excel files and want to add a column to each of them but not to change the filename or any other attribute.  I just want to process them in turn add a calculated field and then save the file in the same location and with the same filename thereby overwriting the previous file.

 

Is there an easy way to do this rather than having to do it one at a time with input, formula, and output tools?

 

Many thanks,

Katy

11 REPLIES 11
Ben_H
11 - Bolide

Hi @Katy_Holder-Vale

 

If you want to really simplify things you could just do this -

 

Ben_H_0-1669392666149.png

 

This only works with Excel files with the same structure with a single sheet you want to update.

 

You use the wildcard * to read in every Excel file in the directory Including the filename in the output, then do your simple calc and overwrite the input file using the "Take Field/Table Name from Field" option in the output tool.

 

Ben_H_1-1669393067539.png

 

 

Ben_H_2-1669393120573.png

 

 

Obviously if one of the Excel files has a different structure this will not work.

 

Regards,

 

Ben

 

 

Katy_Holder-Vale
7 - Meteor

I didn't.......... and like you can't believe that it must be this hard to open a file, make a change and then save it again....

 

Labels