[]
Collapses current group.
This method hides the rows or columns in the current outline group and marks the group as collapsed. If the group is already collapsed, this method does nothing. Use IsCollapsed to determine the current collapse state, or Expand() to show the grouped rows or columns again.
void Collapse()
Sub Collapse()
worksheet.Range["2:5"].Group();
IGroupInfo group = worksheet.Outline.RowGroupInfo[0];
group.Collapse();