Change cell background color

Description

Sets the background color of the cell B3 to blue.

(function()
{
    Api.GetActiveSheet().GetRange("B3").SetFillColor(Api.CreateColorFromRGB(0, 0, 250));
})();

Methods used: GetActiveSheet, GetRange, SetFillColor, CreateColorFromRGB

Reference Microsoft VBA macro code

Sub example()
    Range("B3").Interior.Color = RGB(0, 0, 250)
End Sub

Result

Background 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).