DEV Community

Mikhail Klimenko
Mikhail Klimenko

Posted on Originally published at horizonventures.app

How to get a Confluence table into Excel

Short answer. Confluence exports whole pages to PDF and Word, but it has no built-in export for a single table. Select the table on the page, copy it, and paste into Excel: for a simple rectangular table that is the end of the story. Merged cells, long tables and multi-table pages are where it stops being that easy.

Route one: copy and paste

Click just above the top-left cell and drag to the bottom-right, or click into the table and select all of it, then copy. In Excel use Paste Special → Text rather than a plain paste: a normal paste brings Confluence's styling with it, and you spend the next ten minutes stripping background colours out of cells.

This is the right answer more often than app vendors like to admit. If you need one table today, do this and stop reading.

Where it breaks

Situation What you get
Merged cells Columns shift left in every row below the merge, and the file looks fine until somebody sums the wrong column.
Numbers with separators Excel may read 1,250 as text, or as 1250 depending on locale. Check one cell before trusting the totals.
Dates Converted according to the spreadsheet's locale, not yours. This is where day and month swap places silently.
Links inside cells Usually arrive as display text, and the address is lost.
Very long tables Fine technically, painful in practice: selecting three hundred rows in a browser is its own small ordeal.

The merged-cell problem is the one that costs money. A shifted column does not look like an error, it looks like data, and it goes into a report that somebody signs.

Route two: export the page to Word, then to Excel

From the page menu choose Export → Word, open the file, and copy the table from there. It sounds like a detour, and it is, but Word handles merged cells more predictably than the browser clipboard, and for a single complicated table it sometimes saves the day.

Not worth it for more than one or two tables: you are still copying by hand, only with an extra step.

Route three: the REST API

If somebody on the team is comfortable with scripting, page content can be pulled through the Confluence REST API and the tables parsed out of it. This is the only free route that scales to many pages.

Two warnings. The stored page is not what you see: a table produced by a macro is stored as the macro, not as rows, so your script will find nothing where the browser shows a neat table. And parsing merged cells correctly is exactly the same problem as above, now yours to solve in code.

When copying stops being reasonable

Same arithmetic as always. One table is two minutes. A page with six tables is fifteen. A quarterly report that pulls tables from forty pages is a day of somebody's life, every quarter, forever — and it is the kind of task that quietly gets skipped, after which the report is out of date.

  • The table is a source, not a picture. If people export the same table every month, the export is part of a process, and manual steps in a process fail on the month somebody is on holiday.
  • Many tables, one file. Collecting tables from a whole space into one workbook with a sheet per table is not something you do by hand twice.
  • Merged cells everywhere. Any export that does not expand merged cells produces a file that is subtly wrong, and subtly wrong is worse than obviously broken.

What a tool should do here

Three things, and they are not glamorous. Expand merged cells so every row has the same number of columns. Keep numbers and dates as numbers and dates rather than text. Collect several tables into one workbook instead of producing a folder of files nobody will merge afterwards.

Disclosure: I build Table Export for Confluence, which does exactly that: one table, a whole page, or every table in a space into a single workbook, with merged cells expanded so columns stay aligned. It runs inside Atlassian's infrastructure, so page content is read in your own site and nothing is sent to me. Free for teams up to ten people.

There are other apps in this category, and for a single table the free copy-paste beats all of them. Pick by what your case actually is.

Frequently asked

Can I schedule an export? Nothing built in will do that. If the export needs to happen on a schedule, you are looking at automation against the API, or at accepting that a person will click a button.

What about Google Sheets instead of Excel? Pasting into Sheets behaves much like Excel, with the same merged-cell trap. CSV imports cleanly if you produce a proper CSV in the first place.

Does exporting a table export its formatting? Colours and fonts are presentation, and any sane export drops them. What matters is that values, numbers and dates survive intact.

The table comes from a macro. Will it export? Copying from the browser works, because you are copying what is rendered. Scripts reading stored page content usually see the macro instead of the rows — worth checking before building anything on that route.

Top comments (0)