We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grouping

Hi,

I'm creating an Excel Sheet that contains personal data like adress private, address business, phone, etc.

Now I want to group by collumns. Therefore I'm using the following code:

sheet.Range[1, 3, 1, 5].Group(ExcelGroupBy.ByColumns);
sheet.Range[1, 6, 1, 8].Group(ExcelGroupBy.ByColumns);
sheet.Range[1, 9, 1, 15].Group(ExcelGroupBy.ByColumns);

I want to have three groupings. But what I get is one single grouping for column 3 to 15.

Can you help me how to add more then one grouping (not cascaded).

BR
Christoph


1 Reply

AD Administrator Syncfusion Team March 27, 2008 06:24 AM UTC

Hi Christoph,

Thanks for considering Syncfusion.

This is normal behavior of MS Excel also. If you set the first Group range to [1, 3, 1, 4] and second group range to [1, 5, 1, 8], the result will be single grouped range. Please refer the below modified code to get three grouped range in single row.

[C#]
//Group by row
sheet.Range[1, 3, 1, 4].Group(ExcelGroupBy.ByColumns );
sheet.Range[1, 6, 1, 8].Group(ExcelGroupBy.ByColumns);
sheet.Range[1, 10, 1, 15].Group( ExcelGroupBy.ByColumns);

Here is the video clip for MS Excel normal behavior

http://websamples.syncfusion.com/samples/XlsIO.Windows/P42551/main.htm


Please let me know if you need any further assistance.

Best Regards,
Bhuvana



Loader.
Live Chat Icon For mobile
Up arrow icon