Need help with multi-level outlining

May 15, 2013 at 3:32 PM
Edited May 15, 2013 at 3:33 PM
I'm having a really tough time trying to get multi-level outlining applied properly. I have 5 loops of collections that I'm trying to apply outlining to, but it is only placing everything under outline level 1 and ignoring the rest.

Below is a snippet of what I have:
foreach (var publisher in Publishers)
     worksheet.cells[pubRow, 1].Value = publisher.Name;
     worksheet.Row(pubRow).OutlineLevel = 1;

     foreach (var author in Authors)
          worksheet.cells[authorRow, 2].Value = author.Name;
          worksheet.Row(pubRow).OutlineLevel = 2;

          foreach (var book in Books)
               worksheet.cells[bookRow, 3].Value = book.Title;
               worksheet.cells[bookRow, 4].Value = book.ISBN;
               worksheet.cells[bookRow, 5].Value = book.Edition;
               worksheet.cells[bookRow, 6].Value = book.Pages;
               worksheet.row(bookRow).OutlineLevel = 3;
Can anyone help?
May 27, 2014 at 7:12 AM
I'm facing a similar problem. Did you ever solve this, and can you please share how?