How can I split up several data (string, number) in one cell from an excel file?
6 次查看(过去 30 天)
显示 更早的评论
Hello community,
I am new to matlab and I imported an excel file which includes data of string, number and dates (all data are in the same column) and I want to split it into 3 columns.
Information of the data:
example:
Person XYZ
12345678
01.01.1990
Person ABC
19876543
01.11.1995
and I want to "transpose" the data like that:
column 1 column 2 column 3
Person XY 12345678 01.01.1990
Person ABC 19876543 01.11.1995
I think its not that difficult to solve this problem, I already tried so solve it with a for loop and if statement but I have some problems to get the right syntax.
Thanks in advance!
stay safe!!! :-)
2 个评论
dpb
2021-4-7
And, in fact, given the mixed content in the file, you'll get a column of cellstr() when you read the Excel file automagically so really have almost nothing left to do! :)
回答(1 个)
Arjun
2025-6-10
Here is an existing MATLAB answer which might be helpful to you, as it addresses the same issue that you are facing.
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!