I tried to solve the same problem and ended up opening a tool to improve the performance of the Open XML SDK 2.0 and using the function Compare Files...to compare two tables: one with and without frozen panels.
When I did this, I got code that looked basically like this:
WorkbookPart wbp = doc.WorkbookPart;
WorksheetPart wsp = wbp.WorksheetParts.First();
SheetViews sheetviews = wsp.Worksheet.GetFirstChild<SheetViews>();
SheetView sv = sheetviews.GetFirstChild<SheetView>();
Selection selection = sv.GetFirstChild<Selection>();
Pane pane = new Pane(){ VerticalSplit = 1D, TopLeftCell = "A2", ActivePane = PaneValues.BottomLeft, State = PaneStateValues.Frozen };
sv.InsertBefore(pane,selection);
selection.Pane = PaneValues.BottomLeft;
I added this to my program and it seems to have done the trick.
source
share