Help reading Excel files

2 ビュー (過去 30 日間)
Amir Hamzah UTeM
Amir Hamzah UTeM 2011 年 2 月 10 日
How do I let MATLAB know how many columns in my Excel file when I'm loading it in a GUI? Let's say I have 22 values in the first column. How can I let MATLAB know it was a 22nd column or n-th column?
I hope someone can help me with some code example for my learning.

回答 (1 件)

Héctor Corte
Héctor Corte 2012 年 1 月 10 日
With this code you get value on cell (A , fila):
ActivesheetRange = get(Activesheet,'Range',['A',num2str(fila)]);
To check if this cell is empty you can use:
isnan(ActivesheetRange.value)
Make a loop that looks for a empty cell along a row and you will get how many columns you have.

カテゴリ

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