Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
ALTER.NEXT:

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

SAVE YOUR SPOT
It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!

Converting txt to Excel

Highlighted
Inactive User
Not applicable

I have a folder of .txt files that I want to convert, in bulk, to a folder of excel files. I am having trouble getting my multiple file macro and .txt files to work. How would I perform the conversion to all files in the folder?

Highlighted
Alteryx
Alteryx
Do these all have the same schema? You could use an input data tool with a wildcard and include the file name as a field with the settings to set the tables up based on the delimiter specified. Use a formula tool to replace the txt with xlsx|||Sheet1, and then you can use an output data tool where you take file name from field.
Highlighted
Alteryx
Alteryx

@Inactive User You can use the directory tool with the dynamic input tool to bring in the text files. This only works if they have the same schema, if the schema change I can share how to do that as well. 

 

The key is to bring in the files as a .csv with no delimiter (\0) and then use the text to columns tools to parse it out if needed. Does this help?

Digan
Alteryx
Highlighted
5 - Atom

Hi, Digan. I often need to batch convert multiple txt files to excel where the files do not have the same schema. Would you please share how to do this?

 

Many thanks,

Susan

Labels