フィルターのクリア

How to read an excel table and limiting its size (# of rows) to only the data entries

8 ビュー (過去 30 日間)
Sole
Sole 2020 年 6 月 24 日
コメント済み: Sole 2020 年 6 月 29 日
Hi, I have a table with data filled in from 57 rows and 15 colums. How do I limit the size to 57 by 15 when reading it and be able to use it for other different size tables as well? So ibasing it on the rows with entries in it. When I use the readtable function, I get a 299x15 table in the workspace so most of those rows are blank (NaN).
  2 件のコメント
KSSV
KSSV 2020 年 6 月 24 日
You can specify the range of sheet to be read..read the documentation.
Fangjun Jiang
Fangjun Jiang 2020 年 6 月 24 日
Or read all in and then process. I always find that is easier.

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

採用された回答

Kanika Gupta
Kanika Gupta 2020 年 6 月 24 日
編集済み: Kanika Gupta 2020 年 6 月 24 日
Yes you can do that, read the documentation around readmatrix herehttps://in.mathworks.com/help/matlab/ref/readmatrix.html
In your case the rectangular range would be A1:BE15
xlRange = 'A1:BE15';
M = readmatrix('Name_Of_EXCEL.xlsx','Sheet','SheetName','Range',xlRange)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by