Skip to main content

Метод Document::getConditionalFormatRules

Метод позволяет получить коллекцию правил условного форматирования для табличного документа.

Вызов​


public ConditionalFormatDocumentRules getConditionalFormatRules()

Возвращает​

Пример​


ConditionalFormatDocumentRules rules = document.getConditionalFormatRules();
shared_ptr<AboveAverageConditionalFormatOperator> aboveOperator;
auto ruleEnumerator = rules.getEnumerator();

while(ruleEnumerator->isValid()) {
ConditionalFormatRuleProxy rule = ruleEnumerator->getCurrent();
if (rule.getType() == ConditionalFormatOperatorType::AboveAverage)
{
aboveOperator = castToAboveAverageConditionalFormat(rule.getOperator());
}
ruleEnumerator->goToNext();
}