[]
Returns an IDataBar object representing a data bar conditional formatting rule for the specified range.
Use the returned rule to configure how data bars visualize relative cell values in the range, such as the bar fill type, color, direction, and whether cell values are displayed.
IDataBar AddDatabar()
Function AddDatabar() As IDataBar
| Type | Description |
|---|---|
| IDataBar | A new IDataBar object. |
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{1}, {2}, {3}, {4}, {5}};
IDataBar dataBar = range.FormatConditions.AddDatabar();
dataBar.BarFillType = DataBarFillType.Solid;