Use case

You need to add background and text color.

Solution

  1. Switch the page to the edit mode.
  2. Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.
  3. Select the macro and click Edit.
  4. In the Presets  tab select Custom transformation  and click Next.
  5. Enter the following SQL query:

    SELECT 
    FORMATWIKI("{cell:bgColor=yellow}", T1.'Rep', "{cell}") AS 'Rep',
    FORMATWIKI("{cell:bgColor=#FFE5B4}", T1.'Department', "{cell}") AS 'Department',
    FORMATWIKI("{cell:bgColor=orange|textColor=yellow|align=center|vertical-align=bottom|width=500px}" 
    , T1.'City', "{cell}") AS 'City',
    FORMATWIKI("{panel:bgColor=orange|textColor=white}", T1.'City', "{panel}") AS 'City 1',
    FORMATWIKI("{color:orange}", T1.'City', "{color}") AS 'City 2'
    FROM T1
    SQL

    You can write both a color name from this list and your own HEX code in the SQL query.

    Keep the following order of attribues: bgColor, textColor, align, width.

  6. Click Next
  7. Define the table settings and view options if needed. 
  8. Save the macro and the page.