フィルターのクリア

Condition and xlsread

2 ビュー (過去 30 日間)
Pepa
Pepa 2011 年 3 月 17 日
Hallo,
how can i put xlsread to condition?
If label (value) doesn´t exist that it do something.
For example:
if(xlsread(excel,'7.1_1_a',sprintf('AC%d',j))==??? || xlsread(excel,'7.1_1_u',sprintf('AC%d',j))==??? || xlsread(excel,'7.1_1_i',sprintf('AC%d',j))==???)
lol = 0;
else
script2 (excel);
end

採用された回答

Laura Proctor
Laura Proctor 2011 年 3 月 17 日
I think that if you're simply looking to see if there is data in the cell, you can just use the ISEMPTY function. Something like this:
xlswrite('test.xls',magic(2))
if isempty(xlsread('test.xls','Sheet1','A4'))
disp('The cell is empty')
else
disp('The cell contains a value')
end
Although, it would probably be better, since you're using XLSREAD anyway, to read the data into a variable.
What is your goal? Maybe I can be of more help if I better understand what you are trying to do.
  1 件のコメント
Pepa
Pepa 2011 年 3 月 17 日
Thank you.
I needed "isempty".

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by