Import csv content into a page using page template

Any advice on whether there's a way on importing csv content into a page with page templates.

In the page template, there are labels. . . can I match up the csv data to the labels and import them into pages in a space automatically?

Thanks in advance for your help!

2 answers

1 accepted

Don't fully understand your question, but you can use the csv macro from the table plugin to display csv data.

Hi Bob,

I would like to automate the creation of pages in a space by using the Add Page from Template.

Here's my made up example:

1) I have a Page Template as follows. . .

h1. Just a test


| Test Summary | @Summary|textarea(5)@ |
| Test Description | @Desc|textarea(10)@ |

2) I have a csv file containing 100 rows of 'Test Summary' and 'Test Description'

3) Is there an automatic way to create 100 pages (like Add Page from Template) and importing the data in the csv into those pages.

Thanks!

Depends on whether this is a one time thing or you need a UI to do it.

  1. Confluence Command Line Interface can be used to automate creation of pages using addPage. runFromCsv can be used to do this based on a CSV file.
  2. If you need something that can be driven from a UI perspective, then this can help: Confluence CLI Plugin

I'll have to give that a try - thanks for the tip!

delete text

Sorry, this was suppose to be a comment. Now I can't delete it.

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 Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

606 views 20 11
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