How do I transpose numerical and text data in excel from columns to rows?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I have an excel spreadsheet that has numerical and text data writen both column wise and row wise. Using matlab, my task is to read and rewrite the spreadsheet so that it all will read column wise. The columns in green are acceptable. The blue columns must be transposed to read as a row and moved up one row.

Thanks!
1 Kommentar
Bob Thompson
am 22 Nov. 2019
I don't entire understand how your final data will be structured, would you mind explaining that a bit more?
That being said, I would suggest splitting the final column off from the rest of the data. If the first four columns are fine, then you can just write them back out with xlswrite, but you might want to write the final column as a separate command.
Transposing matrices in MATLAB can be accomplished with '.
>> A = [1 2 3];
>> A'
ans =
1
2
3
This should also work for cell matrices, or whatever class you have. Tables might be more interesting, but I would imagine the process would be similar.
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!