excel How to make the "+"symbol at the left side of the outline

singa picture singa · Apr 1, 2011 · Viewed 7.3k times · Source

I am using range.group method from the Microsoft.Office.Interop.Excel.dll and it works to group up the columns or rows as the outline level in the Excel document; but there comes the question of how to set the "+"symbol at the left side, but not it's default position at the right side according to the last columns or rows.

What method is used for controlling the direction and how to use this method. It would be best if that's an example,.

Answer

Stijn Bollen picture Stijn Bollen · Feb 15, 2012

In excel: Data/Group and Outline/Settings...

In code:

range.Group(oMissing, oMissing, oMissing, oMissing);

//for rows
worksheet.Outline.SummaryRow = Excel.XlSummaryRow.xlSummaryAbove;

//for columns
worksheet.Outline.SummaryColumn = Excel.XlSummaryColumn.xlSummaryOnLeft;