How to read xls data. Problem

1 view (last 30 days)
Maurizio on 26 Nov 2011
Hi everybody, I have 10 xls files (unknow name) composed by some number and some text. I remember that there is a function to read the data but I don't know why is not working. I'm using the easy function below.
[ndata, text, alldata] = xlsread('LM618.xls','D24:AI31')
The value on the Xls file must be on a single cell or also merge cells?
Is there any possibility to read this data and save it in a txt file?
Anyway I don't need all the data on the range but only 12 cells. For example one is D24, one is G24 one is J24 and so on. Is it possible to specify all the range or matlab must read 12 times the files?

Answers (1)

Image Analyst
Image Analyst on 26 Nov 2011
No, it's all there - no need to call xlsread multiple times. Just specify the cells in the cell array where the values live. Play around with it. Try using parentheses and braces and eventually you'll figure it out. Or read up on cell arrays. Granted it can be confusing. Basically you use braces to get the contents of the cell in the cell array, and parentheses to specify which cell in the cell array to use - or something like that!

Community Treasure Hunt

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

Start Hunting!