Free Trial

Alteryx Designer Desktop Discussions

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

Create different files based on column values and add comment at the bottom

saachitalwar
8 - Asteroid

I have input file in the format

col1col2col3col4
abc1d
abc1d
abc2d
abc2d
*5JGE-END00000004  

 

and I need to create different folders containing files based on col3 values such that files are named c1, c2 and so on and their sheet names are the same. (basically folder, file and sheet name should be the same)

 

Also, I need to add the comment at the bottom of the data of each file like this:

comment should have 8 numbers at the end, last character being the number of data rows above it.

 

col1col2col3col4
abc1d
abc1d
*5JGE-END00000002  
3 REPLIES 3
binuacs
21 - Polaris

@saachitalwar one way of doing this with batch macro

image.png

saachitalwar
8 - Asteroid
this error is popping up
 
DynamicFolder_macro (5) Record #1: Tool #7: The external program "%temp%CreateNewFolder.bat" returned an error code: 1
DynamicFolder_macro (5) Record #1: Tool #18: Unable to Open archive for zipping: C:\Users\binua\OneDrive\Documents\Alteryx\Alteryx Solutions\c1\c1.xlsx Can't open file: C:\Users\binua\OneDrive\Documents\Alteryx\Alteryx Solutions\c1\c1.xlsx: The system cannot find the path specified. (3)
DynamicFolder_macro (5) Record #2: Tool #7: 1 records were written to "C:\Users\F720319\AppData\Local\Temp\7\Engine_99584_6294fd6b775045159f4f292a24ab1d82_\CreateNewFolder.bat"
DynamicFolder_macro (5) Record #2: Tool #7: The external program "%temp%CreateNewFolder.bat" returned an error code: 1
DynamicFolder_macro (5) Record #2: Tool #18: Unable to Open archive for zipping: C:\Users\binua\OneDrive\Documents\Alteryx\Alteryx Solutions\c2\c2.xlsx Can't open file: C:\Users\binua\OneDrive\Documents\Alteryx\Alteryx Solutions\c2\c2.xlsx: The system cannot find the path specified. (3)
DynamicFolder_macro (5) 2 iterations were run

 

 

 

binuacs
21 - Polaris

@saachitalwar update the path inside the macro, you need to change to your path

Labels
Top Solution Authors