虽然不太懂原理 但是 这样好了
Dim g = CurrentTable.grid
Dim cs = g.GetCellRange(0,1,0, 31)
Dim cs2 = g.GetCellRange(0,32,0, 39)
Dim cs3 = g.GetCellRange(0,40,0, 48)
Dim cs4 = g.GetCellRange(0,49,0, 83)
If cs.style Is Nothing Then
cs.style = g.Styles.add("test")
End If
If cs2.style Is Nothing Then
cs2.style = g.Styles.add("test2")
End If
If cs3.style Is Nothing Then
cs3.style = g.Styles.add("test3")
End If
If cs4.style Is Nothing Then
cs4.style = g.Styles.add("test4")
End If
cs.Style.backcolor = color.Yellow
cs2.Style.backcolor = color.Lime
cs3.Style.backcolor = color.DarkTurquoise
cs4.Style.backcolor = color.red