Using variables with CSV Plugin

I'm not sure if this is possible, however I would like to use a variable to store the filepath name of the CSV file being rendered by the CSV plugin.

For example, I have a task set to run in which a report is generated in CSV format. The report that is generated appends the current system date in the format DD_MM_YYYY_HH_MM_A(P) to the end of the filename. I would need to be able to use the Run plugin (or something similar) to set and update a Confluence variable to match the newest filename and present the most recent report.

If this is possible, please let me know. Thanks in advance.

1 answer

1 accepted

Yes, you should be able to use the run or run-now macro to retrieve the $current_time and the dateFormat parameter to get a format matching your naming convention. An alternative is to write a small script (groovy) to get the most recent file in the directory. Use cache macro to improve performance.

Alright, and how would such a variable be passed to the CSV plugin? Would I precede it with a '#' the same as I would with a standard filename or is there some other syntax?

Something like:


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted yesterday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

59 views 2 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you