I have a alphabetical (string) data in .xls file. I want to read it and do some analysis. How can I read separate column/cell for analysis?

2 Comments

Jan
Jan on 28 Apr 2016
What does "alphabetic string" mean and how is it stored in the Excel file? One character per row, per column, or the complete string in one cell?
varsha
varsha on 28 Apr 2016
complete string in one cell. size of file it is giving as 855*7. It is getting loaded in workspace. but how can I read it cell wise and compare and do analysis?

Sign in to comment.

 Accepted Answer

Alessandro Masullo
Alessandro Masullo on 28 Apr 2016

1 vote

6 Comments

varsha
varsha on 28 Apr 2016
It does not work. ex. data in first column is names of images, second column is image parameters and so on... I want to read it and do some analysis. ex. comparing 2 image names. How can I read separate column/cell for analysis?
Star Strider
Star Strider on 28 Apr 2016
If you want the string data, you have to ask for at least 2 outputs from xlsread. The string data will be in the second output.
Jan
Jan on 28 Apr 2016
@varsha: xlsread does work. It is simply the right tool to import the contents of an Excel file. If you observe any problems, post your code and the error message or a detailed explanation of the difference between the results and your expectations.
varsha
varsha on 28 Apr 2016
Thanks!! Star Strider and Jan Simon,
I have used xlsread in following way:
[num,txt,raw] = xlsread('file.xls',1,'D1:D20');
and used for loop to read individual cell in 'txt', like
for i=3:7 disp(txt(i)); end
Thanks!
Star Strider
Star Strider on 28 Apr 2016
My pleasure!
Alternatively you could have used readtable().

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!