Share via

ExcelScript.PivotLabelFilter condition

Gablic 21 Reputation points
2022-05-10T09:42:01.807+00:00

Based on doc: https://learn.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.labelfiltercondition?view=office-scripts
When condition set to ex "equals", "greaterThan", then "comparator" is required. However, in ExcelScript.PivotLabelFilter doc: "https://learn.microsoft.com/zh-cn/javascript/api/office-scripts/excelscript/excelscript.pivotlabelfilter?view=office-scripts
There is no such property as "comparator". I tried this in excel script, no surprise return me an error "Type '{ condition: ExcelScript.LabelFilterCondition; comparator: number; }' is not assignable to type 'PivotLabelFilter'".
How do I use "greaterThan" condition properly? Thanks.

Microsoft 365 and Office | Development | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Gablic 21 Reputation points
    2022-08-16T08:47:33.317+00:00

    @IoTGirl Could you please check my question? Thanks a lot!

    Was this answer helpful?

    0 comments No comments

  2. Gablic 21 Reputation points
    2022-05-10T09:45:59.047+00:00

    Another question:
    I'm trying to set a pivot filter with condition: >=3, is PivotLabelFilter the correct method?
    200622-image.png

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.