MATLAB Answers

xlsread doesn't read a column that contains string in the cells with unknown number of rows

4 views (last 30 days)
Hi all
I am trying to read from an xlsx Excel file some rows in clumn 1 that are strings.
xlsread alone does not function
how to read all and put into a list ?

  9 Comments

Show 6 older comments
farzad
farzad on 20 Jun 2019
Well not a specific purpose I thought there's always a conversion possibility like other languages like python
Bob Nbob
Bob Nbob on 20 Jun 2019
A conversion to what? What are you looking to do with it? all(1) is a cell class element, but all{1} is a string class, which can be used as an input for other commands, such as a file reading function.

Sign in to comment.

Accepted Answer

Dimitar Georgiev
Dimitar Georgiev on 20 Jun 2019
You can use readcell, for example,
example = readcell('example.xlsx','Range','A2:P5');
Now you can extract strings from the cell array.
I would recommend you to read:

  0 Comments

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!