How to Freeze Top Row and Apply Filter in Excel Automation with C#

前端 未结 5 1321
轮回少年
轮回少年 2021-02-02 06:24

I have automation to create an Excel document from C#. I am trying to freeze the top row of my worksheet and apply filter. This is the same as in Excel 2010 if you select View >

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-02 06:31

    Try this...

    workSheet.Activate();
    workSheet.Application.ActiveWindow.SplitRow = 1;
    workSheet.Application.ActiveWindow.FreezePanes = true;
    

提交回复
热议问题