How to focus or select a cell in Excel

后端 未结 3 2183
感动是毒
感动是毒 2021-01-17 10:58

How to focus a cell in Excel VSTO using C# or to select first cell using C# in VSTO?

3条回答
  •  难免孤独
    2021-01-17 11:19

    To select the A2 cell, for example:

    Excel.Worksheet Worksheet = excel.ActiveWorkbook.ActiveSheet;
    Worksheet.get_Range([1,2], System.Reflection.Missing.Value).Select();
    

提交回复
热议问题