Running a macro in excel from Matlab

I have found codes for running macros in excel from matlab, however, it is generic code. Could I see someone's example code for running a macro in excel from matlab. Below is the code I currently have.
xlsfile = 'First_gui.xlsx'; macro = 'Split_Cells';
xls_run_macro(xlsfile,macro);

回答 (1 件)

Krishna Chaitanya Duggineni
Krishna Chaitanya Duggineni 2016 年 3 月 23 日

0 投票

One way to invoke an Excel macro from MATLAB is by launching Excel as a COM server from MATLAB using the 'actxserver' command.
See the example in the link below.

1 件のコメント

Guilherme Brigagão
Guilherme Brigagão 2019 年 8 月 6 日
Hey! Can you copy the answer here? I can't see this link..

サインインしてコメントする。

タグ

質問済み:

2016 年 3 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by