Class ConditionValueWrapper
This object wraps IConditionValue object to ensure correct parent object update.
Inheritance
System.Object
ConditionValueWrapper
Implements
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class ConditionValueWrapper : Object, IConditionValue
Constructors
ConditionValueWrapper(IConditionValue, IOptimizedUpdate)
Initializes new instance of wrapper.
Declaration
public ConditionValueWrapper(IConditionValue value, IOptimizedUpdate parent)
Parameters
Type | Name | Description |
---|---|---|
IConditionValue | value | Object to wrap. |
IOptimizedUpdate | parent | Parent object. |
Properties
Operator
Gets or sets the operator which specifes operator for the threshold values in the conditional format.
Declaration
public ConditionalFormatOperator Operator { get; set; }
Property Value
Type |
---|
ConditionalFormatOperator |
Examples
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
IConditionalFormats conditionalFormats = worksheet.Range["C7:C46"].ConditionalFormats;
IConditionalFormat conditionalFormat = conditionalFormats.AddCondition();
conditionalFormat.FormatType = ExcelCFType.DataBar;
IDataBar dataBar = conditionalFormat.DataBar;
dataBar.MinPoint.Operator = ConditionalFormatOperator.GreaterThanorEqualTo;
Type
Gets or sets the condition value type which specifies how the threshold values for a data bar, color scale, or icon set conditional format are determined. Read-only.
Declaration
public ConditionValueType Type { get; set; }
Property Value
Type |
---|
ConditionValueType |
Examples
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
IConditionalFormats conditionalFormats = worksheet.Range["C7:C46"].ConditionalFormats;
IConditionalFormat conditionalFormat = conditionalFormats.AddCondition();
conditionalFormat.FormatType = ExcelCFType.DataBar;
IDataBar dataBar = conditionalFormat.DataBar;
dataBar.MinPoint.Type = ConditionValueType.LowestValue;
Value
Gets or sets the shortest bar or longest bar threshold value for a data bar conditional format.
Declaration
public string Value { get; set; }
Property Value
Type |
---|
System.String |
Examples
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
IConditionalFormats conditionalFormats = worksheet.Range["C7:C46"].ConditionalFormats;
IConditionalFormat conditionalFormat = conditionalFormats.AddCondition();
conditionalFormat.FormatType = ExcelCFType.DataBar;
IDataBar dataBar = conditionalFormat.DataBar;
dataBar.MinPoint.Value = "0";
Methods
BeginUpdate()
Initiates updates to the object.
Declaration
public void BeginUpdate()
Remarks
This method should be called before several updates to the object will take place.
EndUpdate()
Ends updating the object.
Declaration
public void EndUpdate()
Remarks
This method should be called after several updates to the object took place.