Display CSV file on a page

Jonathan Abrahams June 29, 2022

I have the following scenario:

  • Daily generate a new copy of a CSV file in a cron job
  • The CSV file will not always have the same number of rows
  • Embed the CSV on a Confluence page, which has other information

 

Notes:

  • The CSV will be generated on a Linux-based system in Python
  • Would like to use the REST APIs to update the Confluence page in Python
  • Would like to avoid any 3rd party tools or macros

 

Questions:

  • Can I upload the CSV to be stored as content in Confluence, but is not directly viewable?
  • Can I just create a Confluence page which references the stored CSV file?

1 answer

0 votes
Mykenna Cepek
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 29, 2022

Seems like you could "upload the CSV as Confluence content" using the Confluence API, specifically with the "content" features:

https://developer.atlassian.com/cloud/confluence/rest/api-group-content/

I haven't done it myself, but that's the direction I'd go with this.

Without a Marketplace App, I'm not aware of any built-in features in Confluence Cloud which can reference data in a "stored file". Since Confluence is running in the Cloud, how would it be able to get access to this file? The security aspects alone would be significant.

Katerina Kovriga _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2022

Hi @Jonathan Abrahams ,

Speaking of 3rd party apps I can suggest looking into our Table Filter and Charts for Confluence app and its Table from CSV macro.

Maybe our macro will help your case. Besides the add-on is free for Cloud 1-10 users.

Like # people like this
mdwebber
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 29, 2023

Jonathan - I have a similar problem as you in this question from last year. Did you ever come up with a solution that you can share? I just have to get an existing csv off of a network share onto a Confleunce page. Problem I have is I work for a large Corp and everything is locked down, Admins told me to use a REST and that will do it. Of course no one will tell me what the API secret is etc. A freakin disaster for me. Any loopback you can share (please)? michael w colorado

Jonathan G November 10, 2023

@Katerina Kovriga _Stiltsoft_   are you able to update the csv and have it update the file in Confluence, or is it static once uploaded?

Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 11, 2023

Hi @Jonathan Grainger ,

The Table from CSV macro is dynamic: if you connect it to your Google Spreadsheet and make any changes there or update the page attachment that is reflected through the macro, your result table will be updated as well.

And you may also try the Table Spreadsheet macro: you'll be able to upload your existing csv/xlsx file and continue to work with it right in Confluence (cell formulas, filtration, conditional formatting, pivot tables and other Excel-like features are supported).

If required, you may then export your spreadsheet in csv/xlsx formats.

Like # people like this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events