xlsread error in 2018b

2 ビュー (過去 30 日間)
진회 김
진회 김 2023 年 2 月 8 日
回答済み: Jeremy Hughes 2023 年 2 月 9 日
now im using 2018b in cloud server environment.
when i use xlsread, i get some error like
----------------------------------
Source: Microsoft Office Excel
Description: Open method of Workbooks class failed
Help File: C:\Program Files (x86)\Microsoft Office\Office12\1044\XLMAIN11.CHM
Help Context ID: 0
----------------------------------
however, when i use 2015version, the xlsread work well.
please give me answer.
thank yon
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 2 月 8 日
I suggest you use readtable()
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 2 月 8 日
Or use readmatrix()

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

回答 (2 件)

Rishav
Rishav 2023 年 2 月 9 日
You can use the ‘readtable’ alternative from MATLAB, which is designed to read text-based files, including .csv and .xlsx files. Here is a code snippet, that you can refer to use readtable() function.
filename = 'myfile.xlsx';
T = readtable(filename);

Jeremy Hughes
Jeremy Hughes 2023 年 2 月 9 日
xlsread uses an active Excel process on windows and has different behavior entirely on other platforms (or if excel isn't installed), this is one reason isn't not recommended, especially in cloud contexts where the platform may not always be the same. It could be that the cloud server environement is different (not sure if this is some MATLAB server or what...) but newer functions, like the already mentioned readtable and readmatrix, don't have the same limitation.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by