/*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for Additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
namespace HH.WMS.Utils.NPOI.SS.UserModel
{
using System;
using HH.WMS.Utils.NPOI.SS.Util;
/**
* The 'Conditional Formatting' facet of
* This method could be used to copy ConditionalFormatting object * from one sheet to another. For example: *
** ConditionalFormatting cf = sheet.GetConditionalFormattingAt(index); * newSheet.AddConditionalFormatting(cf); ** * @param cf the Conditional Formatting to clone * @return index of the new Conditional Formatting object */ int AddConditionalFormatting(IConditionalFormatting cf); /** * A factory method allowing to create a conditional formatting rule * with a cell comparison operator *
* The Created conditional formatting rule Compares a cell value * to a formula calculated result, using the specified operator. * The type of the Created condition is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} *
* * @param comparisonOperation - MUST be a constant value from **
* The type of the Created condition is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} *
* * @param comparisonOperation MUST be a constant value from ** The type of the Created format condition is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA} *
* @param formula the formula to Evaluate. MUST be a Boolean function. */ IConditionalFormattingRule CreateConditionalFormattingRule(String formula); /** * Gets Conditional Formatting object at a particular index * * @param index 0-based index of the Conditional Formatting object to fetch * @return Conditional Formatting object ornull
if not found
* @throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1)
*/
IConditionalFormatting GetConditionalFormattingAt(int index);
/**
*
* @return the number of conditional formats in this sheet
*/
int NumConditionalFormattings { get; }
/**
* Removes a Conditional Formatting object by index
*
* @param index 0-based index of the Conditional Formatting object to remove
* @throws ArgumentException if the index is outside of the allowable range (0 ... numberOfFormats-1)
*/
void RemoveConditionalFormatting(int index);
}
}