本帖最后由 Richard.Huang 于 2024-1-24 16:41 编辑
- const compareType =
- GC.Spread.Sheets.ConditionalFormatting.TextCompareType.notEqualsTo;
- const condition = new GC.Spread.Sheets.ConditionalFormatting.Condition(
- GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition,
- { compareType, expected: "0 方便面" }
- );
- // const condition1 = new GC.Spread.Sheets.ConditionalFormatting.Condition(
- // GC.Spread.Sheets.ConditionalFormatting.ConditionType.textCondition,
- // { compareType, expected: '1 可乐' },
- // );
- const rowfilter = sheet.rowFilter();
- rowfilter.addFilterItem(4, condition);
- // rowfilter.addFilterItem(4, condition1);
- rowfilter.filter(4); //我想默认筛选filterItems ,如果添加两个condition筛选就不生效了,如果单独添加如代码所示一个条件,那么筛选是成立的
复制代码
|
|