LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Publishing - Output Excel - Add Sysdate to file name

    Employee
    Posted 04-20-2012 06:27

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Kevinpbarry

    When publishing to excel is there a way to add the sysdate to the file so that each time I re-run the file it doesn't overwrite the existing file?

    Thanks


  • 2.  RE: Publishing - Output Excel - Add Sysdate to file name

    Employee
    Posted 04-20-2012 06:58

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Hi,
    Yes this is possible.
    There is a built in parameter in BRE - CurrentDate.
    In order to include this in your filename, you can just use something like:
    <myFileName>_{{^CurrentDate^}}.xls
    in the File parameter on the Output Excel file node.

    See attached BRG for example.

    Tim.
    Attachments:
    OutputCurrentDate.brg


  • 3.  RE: Publishing - Output Excel - Add Sysdate to file name

    Employee
    Posted 04-25-2012 10:17

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Kevinpbarry

    Thank you so much, again that was exactly what I was looking for; 2 for 2 Lavastorm.


  • 4.  RE: Publishing - Output Excel - Add Sysdate to file name

    Employee
    Posted 04-25-2012 12:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    If I may, I would like to add one word of warning below.. please IGNORE this if you're only running only the desktop version of our software.

    ===========================
    IF you move up to our Enterprise software, and IF you start executing graphs "in batch", then the {{^CurrentDate^}} parameter will not be good for you.

    When you generate a BRX (required for batch execution) then the {{^CurrentDate^}} parameter is hard-coded into the BRX and becomes useless for a "daily" operation.

    You'll have to go about this another way: What I've done several times is write the XLS out as something like TemporaryFileName.XLS and then used the moveFile() function to rename the file such that I can add the date in the middle the filename.

    as in:
    moveFile("TemporaryFileName.XLS","<myFileName>_" + str(date()) + ".XLS")