I've been trying for a while to run the following code with Microsoft.Excel.Interop on a new sheet which I add to an existing workbook and fill dynamically, then for display purpose I set these 3 properties:
worksheet.Application.ActiveWindow.SplitRow = 4;
worksheet.Application.ActiveWindow.SplitColumn = 1;
worksheet.Application.ActiveWindow.FreezePanes = true;
Everytime I have the same bug in the resulting workbook : all the other worksheets which were already with frozen panes, become unstructured (half of column B overlaps column C, and other interesting graphical details...).
What I have found out while checking other libraries of Excel automation (ClosedXML for example) is that others modify directly the XML code, so they don't use the ActiveWindow, but directly the worksheet itself.
Is it possible that my problem comes from the fact that I modify a property of the ActiveWindow improperly? If yes, does somebody know whether it's possible to freeze panes without doing it through the ActiveWindow ? If no, does somebody have an idea where it can come from ?
Thanks in advance
Roddhes