Table Totals for Confluence

Sort it, filter it, total it. And the total says what it counted, and what it could not read.

Most table totals are a guess with a confident face

Here is a budget column after four people have edited it. Every value is one somebody typed on purpose:

The Cost column, as four people actually typed it
ItemCost
Laptops£12,450.00
Desks3,200
Refund(1,500)
Monitorsn/a
Chairs2,780.50
Cabling12 units
A macro that reaches for parseFloat reads the currency as zero, turns the refund from minus 1,500 into plus 1,500, reads "n/a" as zero and "12 units" as twelve. It prints 17,962 and offers no hint that anything went wrong.

The right answer is 16,930.50, over four of the six rows. The gap is a thousand pounds in a table nobody will re-add, because the entire reason a totals row exists is that you do not have to.

So the total shows its working

The same table, inside the macro
ItemCost
Laptops£12,450.00
Desks3,200
Refund(1,500)
Monitorsn/a
Chairs2,780.50
Cabling12 units
Total16,930.50
Cost: Total of 4 of 6 rows. 1 cell could not be read as a number ("12 units") and was left out. 1 blank.
That last line is on every total, including when everything added up. A note that only appears on failure teaches people to ignore the line it lives on.

It reads what people actually type. Currency symbols, thousands separators, and accounting brackets, so (1,500) is a negative rather than a positive. Deliberate blanks like "n/a" are left out and counted as left out, never counted as zero.

And it knows what it cannot know

A column containing 1,234 means one thousand two hundred and thirty four in Boston and one point two three four in Berlin. The app works it out from the rest of the column, and where the column gives it nothing to go on, it says on the page that it had to decide rather than quietly being a thousand times out.

Sorting and filtering that do not mislead

Numeric columns sort as numbers, so 300 comes before 1,200 instead of after it. Unreadable values sort to the bottom rather than the top. Filter the table and the total follows what you can see, and the line underneath tells you it did.

It asks for no permissions at all

Look at the install screen: the list is empty. Confluence hands the macro its own body, so the app never calls a Confluence API, never sees another page, stores nothing and cannot write anything. Your table stays in your page, in Confluence's own format. Uninstall the app and you lose the totals row, not the data.

Support

Send this and it reaches a monitored inbox. Replies come from a person, in English, on business days. Anything that has actually stopped working gets looked at the same day.

Privacy policy Terms of service