フィルターのクリア

Reading specific Cell in Excel

137 ビュー (過去 30 日間)
Russell
Russell 2014 年 5 月 30 日
コメント済み: NAFTALI HERSCOVICI 2022 年 5 月 29 日
I am trying to read a certain cell in Excel with matlab.(B2)
I am then going to use this in an if statement.
Please advise

回答 (3 件)

Mahdi
Mahdi 2014 年 5 月 30 日
編集済み: Mahdi 2014 年 5 月 30 日
Have you looked at the xlsread documentation? It tells you exactly how to do it.
Example:
filename='hello.xls' #Name of file
x=xlsread(filename, 'B2')

Lotus Kannan
Lotus Kannan 2017 年 3 月 14 日
%% x only reads B column values from the excel
filename='example.xlsx';
x = xlsread(filename,'B:B');
  1 件のコメント
Gamal Zayed
Gamal Zayed 2020 年 5 月 11 日
Thanks

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


Shirin Mozaffari
Shirin Mozaffari 2018 年 7 月 18 日
for example you wanna read cell A2. This is what you should do: cell = xlsread(fileName,'A2:A2')
  2 件のコメント
Jesus Leal
Jesus Leal 2022 年 3 月 13 日
what if i wanted to recall a cell and every 6th cell after that
NAFTALI HERSCOVICI
NAFTALI HERSCOVICI 2022 年 5 月 29 日
Is there any way to use the cell indices rather than letters to specify columns?
Like in excel the range can be defined as Range(cells(2,1),cells(2,1)) instead of Range("a2:a2")

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

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by