XmlMappedRange.Group Method (2007 System)

When the XmlMappedRange control represents a single cell in the data range of a PivotTable field, the Group method performs numeric or date-based grouping in that field.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Public Function Group ( _
    Start As Object, _
    End As Object, _
    By As Object, _
    Periods As Object _
) As Object
'Usage
Dim instance As XmlMappedRange 
Dim Start As Object 
Dim End As Object 
Dim By As Object 
Dim Periods As Object 
Dim returnValue As Object 

returnValue = instance.Group(Start, End, _
    By, Periods)
public Object Group(
    Object Start,
    Object End,
    Object By,
    Object Periods
)
public:
Object^ Group(
    Object^ Start, 
    Object^ End, 
    Object^ By, 
    Object^ Periods
)
public function Group(
    Start : Object, 
    End : Object, 
    By : Object, 
    Periods : Object
) : Object

Parameters

  • Start
    Type: System.Object

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

  • End
    Type: System.Object

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

  • By
    Type: System.Object

    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 element 4 in the Periods array is true and all the other elements are false. Otherwise, this argument is ignored. If this argument is omitted, Microsoft Office Excel automatically chooses a default group size.

  • Periods
    Type: System.Object

    An array of seven Boolean values that specify the period for the group, as shown:

    1 - Seconds

    2 - Minutes

    3 - Hours

    4 - Days

    5 - Months

    6 - Quarters

    7 - Years

    If an element in the array is true, a group is created for the corresponding time; if the element is false, no group is created. If the field is not a date field, this argument is ignored.

Return Value

Type: System.Object

Remarks

Optional Parameters

For information on optional parameters, see The Variable missing and Optional Parameters in Office Solutions.

.NET Framework Security

See Also

Reference

XmlMappedRange Class

XmlMappedRange Members

Microsoft.Office.Tools.Excel Namespace