using System;
using System.Collections.Generic;
using System.Text;

namespace GrapeCity.Documents.Spread.Examples.Features.Grouping
{
    public class UngroupRange : ExampleBase
    {
        public override void Execute(GrapeCity.Documents.Spread.Workbook workbook)
        {
            IWorksheet worksheet = workbook.Worksheets[0];
            //1:20 rows' outline level will be 2.
            worksheet.Range["1:20"].Group();
            //1:10 rows' outline level will be 3.
            worksheet.Range["1:10"].Group();

            //1:10 rows' outline level will be 2.
            worksheet.Range["1:10"].Ungroup();
            //1:20 rows' outline level will be 1.
            worksheet.Range["1:20"].Ungroup();
        }
    }
}
