Get Started
Documentation

ApiColor

new ApiColor()

Class representing an RGB color.

Methods

Name Description
GetClassType Get the type of this class.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oColor = Api.CreateColorFromRGB(49, 133, 154);
oWorksheet.GetRange("A2").SetValue("Text with color");
oWorksheet.GetRange("A2").SetFontColor(oColor);
oColorClassType = oColor.GetClassType();
oWorksheet.GetRange("A4").SetValue("Class type = " + oColorClassType);
builder.SaveFile("xlsx", "ApiColor.xlsx");
builder.CloseFile();

Resulting document