Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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,.

like image 286
singa Avatar asked Apr 01 '11 06:04

singa


2 Answers

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;
like image 129
Stijn Bollen Avatar answered Nov 11 '22 15:11

Stijn Bollen


To apply it on the left without using VBA:

In Excel: Data-> Outline. Click on the arrow on the bottom right corner of the ribbon (The arrow is pointing down right.)

It will open the Outline Settings.

Untick "Summary column on the right on the right of detail." Click Apply Styles.

like image 35
Gerhard Powell Avatar answered Nov 11 '22 16:11

Gerhard Powell