How to Launch an Excel macro from command line (Without Worksheet_Open Event)?

后端 未结 5 1250
走了就别回头了
走了就别回头了 2020-12-14 12:17

Is it possible to launch an Excel Macro from command line?

I don\'t want to use the Worksheet_Open event and just open the Excel File.

I need to

5条回答
  •  臣服心动
    2020-12-14 13:21

    Thank you! Mehdi your answer worked for me too with a small adjustment. The line xl.Application.Visible = True was leaving open a zombie/phantom EXCEL.EXE process using up memory (found it through Windows Task Manager). Using xl.Application.Visible = False instead seems to eliminate the zombie.

提交回复
热议问题