[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IFormatConditions.AddDatabar

AddDatabar Method

AddDatabar()

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.

Declaration
IDataBar AddDatabar()
Function AddDatabar() As IDataBar
Returns
Type Description
IDataBar

A new IDataBar object.

Examples
IRange range = worksheet.Range["A1:A5"];
range.Value = new object[,] {{1}, {2}, {3}, {4}, {5}};
IDataBar dataBar = range.FormatConditions.AddDatabar();
dataBar.BarFillType = DataBarFillType.Solid;