I'm adding several worksheets to my Excel spreadsheet. After the last one is added, I activate the first worksheet:
The problem with that is that when I open the .xls and make a change to that first worksheet (such as hide some rows), the change is being reflected on ALL the worksheets. To avoid this, after I open the .xls, I have to either select a different worksheet and go back to the first one or right click on one of the tabs and select "Ungroup Sheets" option . How can I do ungrouping programmatically? I tried to look for some property that I can set for each worksheet right after is has been added to the workbook, but can't find anything useful. I'm sure there's a way, I just don't have much experience in this area. I would appreciate your help.
Code:
workbook.Worksheets.Select(1)