
By using OpenXML I have managed to add font, size and color into Excel Buffer. I also need to use AutoFilter and FreezePanes.
Any ideas?
*This post is locked for comments
I have the same question (0)Read this: www.infinite-x.net/.../openxml-worksheet-adding-autofilter
Excel OpenXML is sometimes a pain dues to the shared string syntax, but as that article shows, in most cases you can use inlinestrings (when inserting, modifing is a whole other pain).
FreezePanes, here is an C# examples:
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;
Its not that use to do the generics - Here is an article I wrote on the subject: www.hougaard.com/use-reflection-to-call-generic-method-in-dynamics-nav2013