xlsread error: Array indices must be positive integers or logical values.

1 回表示 (過去 30 日間)
Leon
Leon 2019 年 6 月 4 日
コメント済み: Star Strider 2019 年 6 月 4 日
When I try to use xlsread to read the attached Excel file:
[A B C] = xlsread('AA.xlsx');
Why do I keep getting this error? It seems the problem is the last column, but why?
Error using xlsread (line 257)
Array indices must be positive integers or logical values.
Many thanks!

採用された回答

Star Strider
Star Strider 2019 年 6 月 4 日
I was able to read your file without error.
However, if you have R2013b or lalter release, the readtable (link) function is likely the best option for your file:
AA_Table = readtable('AA.xlsx')
  5 件のコメント
Leon
Leon 2019 年 6 月 4 日
Many thanks! It works.
Star Strider
Star Strider 2019 年 6 月 4 日
As always, my pleasure!

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

その他の回答 (1 件)

Leon
Leon 2019 年 6 月 4 日
Thanks all for the replies. I'm using Excel Version 16.25 on MacOS 10.14.5

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by