Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!

Alteryx Designer Discussions

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

Output File name matching the input file name

jmedidi
8 - Asteroid

i am trying to parse a word document and convert to Excel.

 

for example if the input word document name is Test.docx i want the same name for excel output as Test.xls. is there any way i can automate that ? Appreciate the support.

5 REPLIES 5
HomesickSurfer
12 - Quasar

Hi @jmedidi 

 

Configure your Input Tool to 'Output File Name as Field: Full Path, then use the following expression in a Formula Tool before your Output:

 

FileGetFileName([FileName])+".xlsx"
jmedidi
8 - Asteroid

Thanks for the response.

As input Data Tool doesn't support Word Docs i am using a macro to read a word doc file. Will this complicate it or i can use the logic at output side alone for this to work ?

HomesickSurfer
12 - Quasar

Hi @jmedidi 

 

Does the macro have the Input Date Tool?

jmedidi
8 - Asteroid

Nope but it have Text Input Tool

HomesickSurfer
12 - Quasar

Hi @jmedidi 

 

Yes, this will work, if the input file field is named FileName, or modify the below to reference that field name.

In the macro, output the field, then add this formula.

FileGetFileName([FileName])+".xlsx"

 

Labels