[]
        
(Showing Draft Content)

GrapeCity.Spreadsheet.IRange.Group

Group Method

Group()

Demotes a range in an outline (that is, increases its outline level). The specified range must be a row or column, or a range of rows or columns.

Declaration
bool Group()
Function Group() As Boolean
Returns
Type Description
bool

true if the specified range is grouped, false otherwise.

Group(double?, double?, double?, PivotGroupPeriods[])

When IRange object represents a single cell in a PivotTable field's data range, this method performs numeric or date-based grouping in that field.

Declaration
bool Group(double? start, double? end, double? by, PivotGroupPeriods[] periods = null)
Function Group(start As Double?, [end] As Double?, by As Double?, Optional periods As PivotGroupPeriods() = Nothing) As Boolean
Parameters
Type Name Description
double? start

The first value to be grouped. If this argument is omitted, the first value in the field is used.

double? end

The last value to be grouped. If this argument is omitted, the last value in the field is used.

double? by

If the field is numeric, this argument specifies the size of each group. If the field is a date, this argument specifies the number of days in each group if only have element Days in the periods array. Otherwise, this argument is ignored. If this argument is omitted, Spread automatically chooses a default group size.

PivotGroupPeriods[] periods

An array of values that specify the period for the group. If an element in the array, a group is created for the corresponding time. If the field isn't a date field, this argument is ignored.

Returns
Type Description
bool

true if the specified range is grouped, false otherwise.