Change cell font color

Description

Sets the font color of the cell B4 to red.

(function()
{
    Api.GetActiveSheet().GetRange("B4").SetFontColor(Api.CreateColorFromRGB(255, 0, 0));
})();

Methods used: GetActiveSheet, GetRange, SetFontColor

Reference Microsoft VBA macro code

Sub example()
    Range("B4").Font.Color = RGB(255, 0, 0)
End Sub

Result

Font color

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).