I have the following issue. I routinely need to get tables into confluence that contain data generated by some other unrelated tool. I can fairly easily generate my tables in storage format and then copy/paste directly into the confluence source editor. However, this is very inefficient, especially if the tables need to change.
Is there any simple way that would let me just upload these generated tables as attachments and then in the body of the document have some macro that expands the contents of the attachment? To be more concrete, here is an example:
file "cakes.xml" (what would a good file extension for storage format be?)
--------------------
<ac:rich-text-body>
<table class="wrapped">
<colgroup> <col/> <col/> </colgroup>
<tbody>
<tr><th>Name</th><th>Calories</th><th>Cost</th></tr>
<tr><td>Chocolate</td><td>1200</td><td>$5.00</td></tr>
<tr><td>Lemon</td><td>1300</td><td>$4.00</td></tr>
</tbody>
</table>
</ac:rich-text-body>
-------------------
when I have images attached to a page, I can have something like this in the body of my document:
<ac:image ac:height="400">
<ri:attachment ri:filename="my_image.png" ri:version-at-save="2" />
</ac:image>
and if I upload a new version of "my_image.png" to the page then the displayed image updates. I'd like a similar way to say "show my attached table here". And then if I simply upload a new version of the table, I'd get it. My alternative right now is to use some awful mess of REST calls to download the page via python, locate the old table (how?), replace the old table, and then upload back.