Alteryx Designer Desktop Discussions

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

Adding the Date in out file

Sarreddy
9 - Comet

Hi Team,

I have create a excel as a file output, in this case I would like change file location by passing the path throughout formula tool.
But when ever I have add a Sheet name included date and time getting a issue.

if I'm excluding date and time stamp I can get exact required output from the workflow.

 

ERROR :: 

Output Data (12) Unable to Open archive for zipping: C:\Users\Ajith\OneDrive\Desktop\tEST2\Sales_2022-11-17 15:43:37.xlsx Can't open file: C:\Users\Ajith\OneDrive\Desktop\tEST2\Sales_2022-11-17 15:43:37.xlsx: The filename, directory name, or volume label syntax is incorrect. (123)

Sarreddy_0-1668680500892.png

 





Thanks
Ajith Reddy.

  

3 REPLIES 3
binuacs
20 - Arcturus

@Sarreddy I think the time format causing the error. Can you update your formula like below and try

 

binuacs_0-1668681054261.png

 

DataNath
17 - Castor

Hey @Sarreddy, this issue is coming from you plugging the DateTimeNow() directly into the filename... As it is in the YYYY-MM-DD HH:MM:SS format, this contains colons (:) which are illegal characters when trying to save an Excel file.

 

DataNath_0-1668681075320.png

 

See here before replacement I get the same error:

 

DataNath_1-1668681112313.png

 

However, if I just replace the colons with something different i.e. a dash, it works fine:

 

DataNath_2-1668681157722.png

DataNath_3-1668681182708.png

 

Obviously you can replace them with anything, I just used hyphens to demonstrate. You can also change the format entirely with DateTimeFormat().

Hope this helps!

Sarreddy
9 - Comet

Hi @DataNath @binuacs  Thank you so much. It's Woking perfectly.😊  

Labels