How can I select automaticaly a header of excel sheet and read the header row with xlread?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nahom Nigatu
le 7 Fév 2019
Commenté : Nahom Nigatu
le 12 Fév 2019
hello,
i have an excel sheet with sensor measurment data . I use xlsread to read the data my question is how can i select the header name of the row and read the data. the header name is always the same but the coulmn number is different therefore i want to give the header name and the program should select the data and plot the result. Do you have idea? thanks in advance.
0 commentaires
Réponse acceptée
Walter Roberson
le 7 Fév 2019
We would suggest using readtable(), after which you can access the columns by name.
3 commentaires
Walter Roberson
le 9 Fév 2019
xlsx files store the data as text . Reading one column of them inherently requires reading all of the columns and throwing away the parts that you do not want . You might as well readtable and access the part you want out of the result .
xls files can be implemented more than one way, one of which is a binary file that might possibly be faster to read just one column . For that use xlsread or readtable and pass it an excel style range like A1:XFD1 . You can then search for your known header in what is returned .
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!