[]
        
(Showing Draft Content)

GC.Spread.Sheets.ConditionalFormatting.TextCompareType

枚举: TextCompareType

Sheets.ConditionalFormatting.TextCompareType

文本比较类型

代码示例

//本示例使用TextCompareType枚举
var nCondition = new GC.Spread.Sheets.ConditionalFormatting.Condition(GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition, {compareType: GC.Spread.Sheets.ConditionalFormatting.TextCompareType.contains, expected: "test"});
var validator = new GC.Spread.Sheets.DataValidation.DefaultDataValidator(nCondition);
validator.type(GC.Spread.Sheets.DataValidation.CriteriaType.custom);
activeSheet.getCell(0, 0, GC.Spread.Sheets.SheetArea.viewport).validator(validator);
spread.options.highlightInvalidData = true;
activeSheet.setValue(0, 0, "testing");
//Type text in 0,0 that does not contain "test" to see invalid symbol

Table of contents

枚举值成员

枚举值成员

beginsWith

beginsWith = 2

字符串是否以指定的字符串开始


contains

contains = 6

字符串是否包含指定的字符串


doesNotBeginWith

doesNotBeginWith = 3

字符串是否以指定的字符串开始


doesNotContain

doesNotContain = 7

字符串是否不包含指定的字符串


doesNotEndWith

doesNotEndWith = 5

字符串是否不以指定的字符串结束


endsWith

endsWith = 4

字符串是否以指定的字符串结束


equalsTo

equalsTo = 0

字符串是否等于指定的字符串


notEqualsTo

notEqualsTo = 1

字符串是否不等于指定的字符串