c# programmatically grouping a range of cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking to group groups of consecutive rows at the same level, for example
group rows 11-26 and then group 27-42 and the group 43-58, etc

I've been using this to group
range = sheet.Rows[string.Format("{0}:{1}", startRow, endRow), Type.Missing]
as Range;
range.Group(Type.Missing, Type.Missing, Type.Missing, Type.Missing);

problem is, when it's done it's grouped from 11-58 and not in the in

this is what I would like it to look like when I am finished

http://img113.imageshack.us/img113/953/excello0.jpg

any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top