Turn around GroupColumns

Hello,

for example it like to group the columns 5-15.

With excel.Worksheets[0].Cells.GroupColumns(5, 15); everything works for me.

But the Groupingsymbol ("+") at the top of the page is above the column 15.

I've got a customner who like to have the symbol above column 5.

It tried to turn around the parameters (excel.Worksheets[0].Cells.GroupColumns(15, 5);) but it won't work for me!

Is it it possible to change the direction of grouping? In Excel I could group the cells this way!

Best Regards

Sören

Please try:

excel.Worksheets[0].Cells.GroupColumns(5, 15);

excel.Worksheets[0].SummaryColumnRight = false;

Thanks!

the following works for me: excel.Worksheets[0].Outline.SummaryColumnRight = false;

Hi
I also have one question similar to this one.Like when I am trying to group columns ex:(2,10)the + sign appears on the 11th columns.Is there any way I can get that sign to 1st column.Please help.
Thanks

@Ruchita123,

Please try using Worksheet.Outline.SummaryColumnRight Boolean attribute to false for your requirements. See the following sample code for your reference:
e.g.
Sample code:

Workbook workbook = new Workbook("e:\\test2\\book1.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
// Grouping columns
worksheet.Cells.GroupColumns(1,9, true);

// Setting SummaryColumnRight property to false
worksheet.Outline.SummaryColumnRight = false;

workbook.Save("e:\\test2\\out1.xlsx");

Also, see the document for your complete reference.

Hi
I tried using this.It does not work for me.
Is there any other way to do this?I referred the documentation too.
Could not find the solution.

@Ruchita123,

Please share your sample (runnable) code (same as above) and sample Excel files (if any) to reproduce the issue on our end. We will check it soon. Moreover, please provide a sample Excel file containing your desired grouped cols with “+” sign appeared on your desired column(s). This will help us really to evaluate your issue precisely to figure it out soon. You may create your desired Excel file manually in MS Excel.

PS. please zip the files prior attaching here.