on 10-14-2015 02:39 PM - edited on 05-02-2023 09:43 AM by gaoa
We get quite a few requests asking how to add the current date to Excel spreadsheet file names. The difference in adding information to your file name in Excel and other output configurations is that you have to use the Reporting tools for Excel to accept the new file name.
Why would I have to use the Reporting tools, you ask? Simply put, Excel thinks that when you are adding a prefix or suffix to the file name that you are stating that additional information is the “Sheet Name” and not appending the file name from the Output Tool. The Render tool in the Reporting tab on your palette basically tricks Excel into thinking that you are creating a separate report and is able to append the date.
In order to add the date to the file name you will connect these tools to your workflow in the order, you see below.
In the Formula Tool, create a new field that is a String type. Go to the DateTime functions and add the DateTimeToday() expression. No configuration of the expression is necessary.
The Table tool will allow you to Group By this new field.
Use the Render Tool to output your Excel spreadsheet with today’s date in the file name.
I'm confused. If I choose Temporary Excel 2007 in the Output Mode, it grays out the Output File/Group Data/Field to Group on/Modify Filename By items so I can't make any changes to them.
If I select Choose a Specific File to Output, then I am able to select a file and select the the rest of the options here, and my output file has the correct name, but i get a corruption warning and when the file opens regarding the filetype, and it looks absolutely nothing like the file should. Basically jibberish.
Any Thoughts?
I tried doing this with a formula and the regular output tool, also, but it kept adjusting the name of the Tab, or telling me I needed to have a tab in the file name, and wouldn't replace the entire File Name/Tab Name if I told it to.
Thanks,
I have somewhat the same issue as FFFool. I find that it works very will with a small number of columns but table width seems to cause a lot of issues. Has anyone else come across this?
I have tried this procedure to add today's date to the end of an Excel filename but I'm having an issue with the output. I have 43 columns and my column headers are getting truncated. Is there a solution for this?
In the render tool, set the paper size to Custom Size, and adjust the width until your data displays properly. Unfortunately, this is the only real way I've found to do this, and it takes some playing around, as if you make it too wide, you will get lot's of empty space in your data.
This solution might have been the only option in 2015 if you are looking for a better solution here's a link to a better option.
The newer solution for adding a date to an Excel file name on output allows you to avoid the truncated table issue that the reporting feature creates.
I have a lengthy folder location, then "Weekly Active Item Report_" + DateTimeToday() + ".xlsx|||Weekly Active Items" built into a formula field but when I add the "Output Data" process, it fails. What am I doing wrong?
Hello @llafreni,
Can you please let me know what the error message is you are getting?
Please send a copy of your workflow if possible, or a screenshot of your output tool configuration.
Thanks!
TrevorS
If I use "Reporting" function to add datestamp on my output excel file, then I have got the result with Currency formatting instead of Date formatting for Dates.
Any solution for formatting change?