Modify colors in Excel

Hello, In a NF report i am trying to modify the colorpallet in Excel using RGB colors. I tried the following code: xlsApplication.ActiveWorkbook.Colors(7) := ‘RGB(226, 226, 226)’; xlsSheet.Range(‘C12’).Interior.ColorIndex := 7; This is not working [V] Can anyone help me?

Hi Marcel, I did it that way: xlSheet.Range(‘A1:E10’).Interior.ColorIndex:=36; Should work.

Hi Skylark, The code you wrote is correct. But that is not the solution to my problem. In Excel you can change the colors of colorpallet using a RGB argument. I want to do a similar action from a Navision report. Best regards, Marcel