No, that wont work, since .ColorIndex is expecting a number, rather than text.
If I simply record a macro of me setting the bkg colour of a cell, I get the following code:
Sub colorBkg()
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 192
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
This is for the darker of the 2 reds available in 'standard-colors' of Excel2007 (rgb(192,0,0))
The method for computing the number used for Interior.Color is:
Red + (256*green) + (65536*green)
With that in mind, consider the following modification to the recorded macro which sets the colour of any selected cells to rgb(100,100,100)
Sub colorBkg()
Dim r, g, b
r = 100
g = 100
b = 100
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = ((b * 65536) + (g * 256) + r)
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub
So, I would expect that you'd need to change your code a little. If I use the object browser, I get the following values for the constants:
Const xlAutomatic = -4105 (&HFFFFEFF7)
Const xlSolid = 1
You don't appear to need to set the last 2 attributes, so you could probably get away with:
excelSheet.Cells(i + 1, 1).Interior.pattern = 1;
excelSheet.Cells(i + 1, 1).Interior.PatternColorIndex = -4105;
excelSheet.Cells(i + 1, 1).Interior.color = 255;
Note: I cant remember if the property names are Case-Sensitive from javascript or not.