On this page
Recipe overview
This recipe provides step-by-step instructions on how to display an attached CSV file as a table on a Confluence page. Because this recipe is using a very large (3,000 record) CSV file, it will leverage the Cache for Confluence add-on to ensure the rendering of the page occurs as quickly as possible. This add-on features these macros:
- The Cache macro, which allows a page to be saved in a cache after being rendered so that subsequent users viewing the page benefit from a much faster page rendering. The Cache macro "wraps around" the page content to be cached, and its parameters allow you to control the length of time the data is cached or optionally allow the user to manually refresh the cache.
- The Future macro, which allows the page to be rendered as it becomes available. This allows the user to see quickly rendered content immediately, while the output of longer running macros is being rendered in the background. This macro also "wraps around" the content it controls. The list of macros that work with the Future macro, including the Cache macro, is listed here.
Please read Page display performance tips and techniques to learn more about what can affect the performance of a Confluence page.
It will take you approximately 4 minutes to complete this recipe.
Recipe level
Ingredients
Preparation
Download the attached SalesLeads.csv file to your computer. The file contains contact information for 3,000 potential sales leads. It was randomly generated using an online tool called Mockaroo so it does not reflect real people or companies. Here is an excerpt from that file, with the first row identifying each field.
first_name,last_name,job_title,email,company,address,state_province,country,postal_code,phone
Aaron,Baker,Analyst Programmer,abakerny@mysql.com,Edgeify,22 Tony Crossing,Florida,US,33777,9-(109)171-6690
Aaron,Chapman,Compensation Analyst,achapman5e@weather.com,Twitterlist,7 Basil Circle,Florida,US,34949,7-(568)437-0309
Aaron,Christopher,Senior Editor,achristopher@bloglovin.com,Jabberbean,5 Arapahoe Lane,Stockholm,SE,100 73,8-(598)183-3882
Aaron,Collins,Structural Engineer,acollins1a@theguardian.com,Avamba,8569 Old Gate Alley,,TN,,2-(467)631-4826
Aaron,George,Senior Developer,ageorgero@odnoklassniki.ru,Roodel,777 Hallows Trail,New York,US,10079,7-(581)862-9457
...