Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Oct 18, 2017 11:51 am

Hi,

I want to do nested group of rows with similar data is as below

- Active: false
- Name:Abc
- model:xperia
brand:sony

when i collapse name it should appear like below
- Active: false
+ Name:Abc

when i collapse all it should appear like below
+ Active: false

xls version which i am using 7.9.0.55040

please suggest me the solution for the same,
Thanks In Advance

sahilakh0601
 
Posts: 1
Joined: Wed Oct 18, 2017 11:07 am

Thu Oct 19, 2017 3:24 am

Hi sahilakh0601,

Thanks for your inquiry.
Please refer to the code below.
Code: Select all
            Workbook workbook = new Workbook();
            Worksheet sheet = workbook.Worksheets[0];
            sheet.PageSetup.IsSummaryRowBelow = false;
            sheet.Range["A1"].Value = "Active: false";
            sheet.Range["A2"].Value = "Name:Abc";
            sheet.Range["A3"].Value = "model:xperia";
            sheet.Range["A4"].Value = "brand:sony";
            sheet.GroupByRows(3,4, true);
            sheet.GroupByRows(2,4,true);
            workbook.SaveToFile("11915.xlsx",ExcelVersion.Version2013);

If this doesn't meet your requirement, please provide the expected document(you could create it by MS excel) for further investigation.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue Oct 24, 2017 9:33 am

Hi sahilakh0601,

Greetings from E-iceblue.
Did you try the solution I provided ? Did it help you solve the issue ?

Thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.XLS