var sheet = spread.getActiveSheet();
var filter = sheet.rowFilter();//filter = null
if (filter) {
filter.removeFilterItems(1);
var condition = new spreadNS.ConditionalFormatting.Condition(spreadNS.ConditionalFormatting.ConditionType.numberCondition,
{
compareType: spreadNS.ConditionalFormatting.GeneralComparisonOperators.lessThan,
expected: 20
});
filter.addFilterItem(1, condition);
filter.filter(1);
sheet.invalidateLayout();
sheet.repaint();
}
导入的表格想做筛选,但拿到rowFilter 的值为 null
|
|