Unable to Open External Program by actxserver

I am getting the following error although the same code works in another device with MATLAB R2021b.
What should I do here?

4 件のコメント

Walter Roberson
Walter Roberson 2022 年 3 月 18 日
Is Microsoft Office installed on the device that is having the problem?
Rounak Saha Niloy
Rounak Saha Niloy 2022 年 3 月 18 日
Yes, Microsoft Office is installed properly.
Walter Roberson
Walter Roberson 2022 年 3 月 18 日
... The 64 bit version?
Rounak Saha Niloy
Rounak Saha Niloy 2022 年 3 月 18 日
Yes, 64 bit,

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

回答 (1 件)

Shanmuganathan
Shanmuganathan 2022 年 11 月 23 日

0 投票

Hi Rounak,
I understand you are not able to open "Excel" from MATLAB using the function "actxserver".
Please follow the below debugging steps to resolve your issue:
  • In order to determine if the issue is with MATLAB or Excel please start Windows Powershell (click start, type 'powershell' and open Windows Powershell app). In power shell, please type this
>>$excel= New-Object -ComObject excel.application
(If this produces an error then the issue is not due to MATLAB.)
  • Please try the following commands in MATLAB command window to check whether other office applications are working fine:
>>word = actxserver('Word.Application')
>>p = actxserver('PowerPoint.Application')
  • Re-Register the Excel Application: From a command prompt, please navigate to where the Excel.exe file is located and and open Command Prompt in Administrator mode to enter the below command:
>>EXCEL.EXE REGSERVER
I hope the above information helps resolve your issue.
Regards,
Shanmuganathan

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

リリース

R2019b

タグ

質問済み:

2022 年 3 月 18 日

回答済み:

2022 年 11 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by