Printing specific rows based on column from excel
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sai Gautam Mandapati
le 11 Avr 2022
Commenté : Sai Gautam Mandapati
le 12 Avr 2022
Good Day,
I have an excel sheet with 7296 rows and 9 columns. So, I want to get certain rows only based on the column value. For example:
Time Node FaceID FaceDescr Type Packets Kilobytes PacketsRaw KiloBytesRaw
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/960275/image.png)
Like the above snippet I have certain rows with the FaceDesc 'ALL' as one of the columns. So, I want my code to print only those rows. I have some unecessary rows that I don't want the code to print like the below screenshot shows. Can anyone please nudge towards the right direction of getting what I need? I'm new to MatLab. Thank you.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/960280/image.png)
0 commentaires
Réponse acceptée
KSSV
le 11 Avr 2022
T = readtable(myfile) ;
idx = matches(T.FaceDescr,'all') ;
T(idx,:)
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets 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!