フィルターのクリア

How to check if excel is installed?

9 ビュー (過去 30 日間)
Noah Kilps
Noah Kilps 2020 年 10 月 30 日
コメント済み: Walter Roberson 2020 年 11 月 2 日
Hello,
My script writes to an xls file. I am packaging this as an app to pass onto others to use. However it occurred to me that it could be possible that they don't have excel. I was wondering if there was a way for matlab to check if you have excel installed before writing/opening an excel file.
Thanks

採用された回答

Walter Roberson
Walter Roberson 2020 年 10 月 30 日
Look at the code for xlswrite, which does
try
Excel = matlab.io.internal.getExcelInstance;
catch exception %#ok<NASGU>
warning(message('MATLAB:xlswrite:NoCOMServer'));
  2 件のコメント
Noah Kilps
Noah Kilps 2020 年 11 月 2 日
Just now had the chance to get back to this. Thanks, Walter. Do you happen to know what
matlab.io.internal.getExcelInstance
will output if you do not have the application?
Walter Roberson
Walter Roberson 2020 年 11 月 2 日
It will error in ActiveX attempt, which is why the try/catch

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by