title: grouping excel rows with EPPLUS
body: <p>what i need is group rows when the value of the row is the same as the previous row, the value of "B3" is the same of "B2", like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Yzv6s.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Yzv6s.jpg" alt="enter image description here"></a></p>
  
  <p>i´m usin c# with epplus, and i see how can i do something similar to this with the outline option, and is similar to what i want, but this option have some disadvantages, such as that which doesn´t automatically group based on values and can´t do various groups....</p>
  
  <p>is it  possible to do this with EPPLUS?  if it´s not posible, how can i add the vba code to c#?, i try this:</p>
  
  <pre><code>  StringBuilder vbaCode = new StringBuilder();
  
    vbaCode.AppendLine("Sheets('Sheet1').Activate");
    vbaCode.AppendLine("Range('A1: D11').Select");
    vbaCode.AppendLine("Selection.Subtotal GroupBy:= 1, Function:= xlSum, TotalList:= Array(2, 3),Replace:= True, PageBreaks:= False, SummaryBelowData:= True");
  pck.Save();
  </code></pre>
  
  <p>but not work, i can´t open the Excel file.</p>
  
  <p>EDIT</p>
  
  <p>With sugested now i try Interop with the group function, but for a extrain reason he is grouping columns not rows, this is the code:</p>
  
  <pre><code> var ExApp = new Microsoft.Office.Interop.Excel.Application();
   Microsoft.Office.Interop.Excel.Workbooks Wbs = ExApp.Workbooks;
   Microsoft.Office.Interop.Excel.Workbook Wb = Wbs.Open(fi.FullName.ToString());
   Microsoft.Office.Interop.Excel.Sheets wss = Wb.Worksheets;
   Microsoft.Office.Interop.Excel.Worksheet Ws = (Microsoft.Office.Interop.Excel.Worksheet)wss.get_Item("Sheet1");
   Ws.Range["A6:A10"].Group();
   Ws.Outline.SummaryRow =Microsoft.Office.Interop.Excel.XlSummaryRow.xlSummaryAbove;
   ExApp.Visible = true;
  </code></pre>