フィルターのクリア

Excel (.csv) error: "Excel Worksheet could not be activated.""

4 ビュー (過去 30 日間)
Nour Aburaed
Nour Aburaed 2019 年 3 月 14 日
回答済み: Bob Thompson 2019 年 3 月 14 日
I am trying to read a column from a csv file.
filename = 'sample.csv';
Longitude = xlsread(filename,'D:D');
when I execute these lines, I get an error that says "Excel Worksheet could not be activated". This error does not accur when I reduce the number of rows in the sheet to 100 (originally it has ~400,000 rows). Does this problem occur because of the large number of rows? Is there a way around it?
  1 件のコメント
Easwar Kumar Yarrabikki
Easwar Kumar Yarrabikki 2019 年 3 月 14 日
I faced this issue when I ignored an MS Office update for several days. Once I have updated and MS office and restarted my machine issue got resolved. Also make sure your MS Office account is also up to date.

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

回答 (1 件)

Bob Thompson
Bob Thompson 2019 年 3 月 14 日
A .csv file is not actually an excel format, although it can be opened with excel. I would suggest using csvread() instead, as it allows you to work directly with the proper format.
I believe it is possible to load .csv files directly with xlsread, however, you are not able to specify which sheet should be used (because .csv files cannot have multiple sheets), and specifying the range is not going to follow the same format (because .csv files do not have letter designated columns).

カテゴリ

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

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by