Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cell level formatting with Macro

Hi ,

Need help in Macros. Let me explain the scenario I am working on.

I have three charts for different regions. The requirement is to identify the clients repeated in these 3 charts and setting the background color for those rows with Green color.

I am trying to achieve this with Macro. But I am failing to set the background color Cell level.

Let me know how we can set background color at cell level.

Below is the code , which I just started doesn't cover the whole requirement.

sub ColorCode

set table = ActiveDocument.GetSheetObject( "CH104" )

set prop = table.GetProperties

for RowIter = 0 to table.GetRowCount-1

       set cell = table.GetCell(RowIter,0)

       if trim(cell.Text) <> "Total"  then

     ***** Need to Set the Color here for the "Cell"***********

        end if

          next

   prop.TableProperties.StyleNumber = -1

   table.SetProperties prop

end sub

0 Replies