xlsread doesn't read a column that contains string in the cells with unknown number of rows
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
Bob Thompson
2019-6-20
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.
采纳的回答
Dimitar Georgiev
2019-6-20
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!