I currently use the sql query macro quite a bit. I would like to format the table cells in some way that changes the cell color based on any value. Currently its a txt value i'd like to tackle.
Example: Cell value = C and turn cell grey, Cell value = F and turn that cell red.
Hopefully I'm making sense. I use the Table Plus macro and table filter macro often as well but still cant seem to find any that do exactly what i want that similar to excel. Problem is i rely on sql queries to auto populate the data in the cells to minimize manual work needed to update.
Thank you in advance!
Is there maybe another macro i can use?
Can java do both the query to pull the data and also table formatting?
Im not too savvy with java but i know some CSS and tried it but didn't work. I am a quick learner and if its possible i just need to be pointed in the right direction. The SQL Query macro does allow for some CSS formatting but only limited to row and column color/mouse over highlighting.
Well I think you best bet is to see if the macro vendor will expose the java objects so that you can write your own macro using Velocity. If they will do that, then you have a chance as you can check the content to then set a class on a table cell that can then be styled with CSS.
Otherwise, my feeling is that it is not worth the effort (or maybe you will get lucky and someone smarter than me will be able to answer this ).
For conditional formatting in Confluence you may use CelesteCS Conditions for Confluence.
Assume you need to set a specific background color for some values on your table, for example, for 'Yes' make it light-green and for 'No' make it light-red. You just put your table into Conditional Rules Manager macro and add two Conditional Rule macros to specify rules of type 'Element Value Is Equal To', which is by default. In one of the rules you specify 'Value 1' = 'Yes' and 'Background color' = 'highlight-green' and in another one 'Value 1' = 'No' and 'Background color' = 'highlight-red'. That's it! The cells will be formatted appropriately.
As you see, it's very simple - just add a couple of macros and configure it properly. No need for doing it manually, writing user macros or use source code editors.
There are more than a dozen of conditional rule types supported. Plus, you may replace the text, not just to format it.
We are the CelesteCS Conditions for Confluence plugin vendor, so you may contact us directly if you have any additional questions or suggestions.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs