Skip to main content

GetClassType

Returns a type of the ApiColor class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiColor class.

Parameters

This method doesn't have any parameters.

Returns

"color"

Example

This example gets a class type and inserts it into the table.

let worksheet = Api.GetActiveSheet();
let color = Api.CreateColorFromRGB(255, 111, 61);
worksheet.GetRange("A2").SetValue("Text with color");
worksheet.GetRange("A2").SetFontColor(color);
let colorClassType = color.GetClassType();
worksheet.GetRange("A4").SetValue("Class type = " + colorClassType);