I'm using this nice tool pod to generate ODT-Files in my django-application. Is there a way to change the backgroundcolor of a table-cell based on its value?
Asked
Active
Viewed 364 times
2 Answers
2
Sure, in LibreOffice its easily found on the menu.
Format -> Conditional Formatting.

xander-miller
- 529
- 5
- 12
-
Which version of LibreOffice are you referring to? – z-- Jun 08 '13 at 06:54
-
@PareidoliaX I need this in an writer-document (odt) not in an calc-document. In writer I can't find "conditional formatting" under the menu Format. I'm using LibreOffice 4.0.3.3 – Robert Dollinger Jun 08 '13 at 10:36
-
Maybe this video helps: http://mindmapapp.blogspot.nl/2013/03/conditional-formatting-in-libreoffice-4.html – phw Jul 03 '13 at 01:33
1
You could generate a tag for the color in your django application and then have a post process LibreOffic Writer macro going through the tags and change the background color of the cells accordingly.

z--
- 2,186
- 17
- 33
-
Thank you for your tip. However I don't know where to start. I already pass the right values in the cells of the table via [pod](http://appyframework.org/pod.html). How can I write a macro that works with django tags? How can I run the macro after that pod has created the odt? – Robert Dollinger Jul 05 '13 at 07:25
-
You would need to add 'helper tags' like ##red in addition to the values of the cells. The macro then searches for the ##red tag, selects the cells and sets the background color accordingly. However I would check if pod does not allow to do that directly. Maybe you can add an example to the question. – z-- Jul 05 '13 at 21:06