Get Started
Usage API
More information

GetClassType

GetClassType() → { "color" }

Returns a type of the ApiColor class.

Parameters:

This method doesn't have any parameters.

Returns:

Type
"color"

Example

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

Resulting document