contact  |  about  |  sitemap

Export to Excel with File name and [todaysdate]
Last Post 10 Apr 2010 08:16 AM by Tijn. 5 Replies.
Sort:
PrevPrev NextNext
Author Messages
tommy

--
16 Mar 2010 12:17 AM
on exporting a datagrid via excel onto a folder in my computer, is there a way to add the date to the excel name.

i have the "get system folder" and "export to excel" which includes the file name i choose, but eveytime i run this extraction, i want the date (ei. march15 or 031510) to be included in the file name as well. whats the best way to create a variable that captures the days date?





Tijn

--
16 Mar 2010 09:18 AM
Here is an example:

Get current Date-Time and store in variable [CurrentDateTime]
Format Date-Time [CurrentDateTime] by specifications yyyymmdd, place resulting text in [aDateNow].
Export to Excel using data grid [DataGrid1] to file c:\[aDateNow].xls (Overwrite: Yes)

Tijn


tommy

--
08 Apr 2010 06:48 PM
thanks...

i did everything as above, the Export to Excel i am using has filename as
[desktop]BofA.xls which is the original version and works. this saves to my desktop no problem.

BUT when I use [desktop]BofA[Date].xls it gives me an Error "data export not successful" the[Date] is a variable because i created a messagebox that displays [Date] and todays date displays.

I tried every mix possible and everything works except using [Date] as part of the file name to export to desktop,

is there a problem using a system folder and the [date] variable?





Tijn

--
08 Apr 2010 08:17 PM
Perhaps you can attach your script to your post.
I think you have not formatted your date correctly.
Note that a slash from the date variable is most likely resulting in a bad path that is not allowed by your OS.

Tijn


tommy

--
09 Apr 2010 10:38 PM
Thanks for the help..

here is the script


BofAFull.djs

Tijn

--
10 Apr 2010 08:16 AM
You had a date format specification dd/mm/yy.
The slash is not allowed in a Windows file path.

I changed it to a specification ddmmyyyy

See the attached updated script.
Tijn

BofAFull_updated.djs



Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
Enter the code shown above:

Submit

Powered by Active Forums

Forum participation and optional registration

You don't need to be registered to partcipate in the Djuggler forums, however if you want to subscribe to email notifications you need to register. You can also subscribe to the forum RSS feed.