Open jontxux opened 3 years ago
change the font color
vCell, _ := worksheet.PropertyGet("Cells", 1, 1)
font := vCell.ToIDispatch().MustPropertyGet("Font").ToIDispatch()
// font.MustPropertyPut("Color", int32(w32.RGB(0xff, 0xff, 0x00))) // yellow
font.MustPropertyPut("Color", int32((0x00<<16)|(0xff<<8)|0xff)) // yellow, BGR
Reference:
RGB function: Returns a
Long
whole number representing an RGB color value.
I have the following code, I would like to add colour to the cell background and change the font colour. Can someone help me?