Best way to pull every other row from excel?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
chlor thanks
am 11 Mär. 2020
Kommentiert: chlor thanks
am 12 Mär. 2020
I have a row of data in excel that goes something like this:
Anna
34
Brandon
55
Calvin
89
What is the best way to pull these information out into a text file as something like this?
Anna Brandon Calvin
34 55 89
Thank you very much!
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 12 Mär. 2020
The challenge here is you are mixing data types. I would recommend using a table with names in one variable and corresponding number in a second variable. Something like this could work.
data = readtable("ChlorThanks.xlsx","ReadVariableNames",false)
name = string(data.Var1(1:2:end));
val = str2double(data.Var1(2:2:end));
newData = table(name,val)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!