Deleting specific rows in an excel file
9 views (last 30 days)
Show older comments
Hello everyone,
I recently started working with MATLAB and have to write a script reading out an excel file and creating a new one with only some specific columns and rows of the previous excel file.
I am encountering a problem with deleting rows in a specific column. The idea is that each row in a column named "TriggerHint" with a value > 15 is being disregarded in the new excel file.
The only things I came up with so far ar either
rows_TriggerHint= pp.TriggerHint<16
or
index=ismember(data_pp.TriggerHint, > 15)
which both don't work.
Thank you in advance!
Luisa
0 Comments
Accepted Answer
Stephan
on 17 Nov 2020
Download the attached file - and copy it in your working directory:
T = readtable('TriggerHintExample.xlsx')
T(T.TriggerHint > 15,:) = []
writetable(T,'myNewFile.xlsx')
More Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!