how to find specific string out of a list in an excel
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ihaveaquest
am 8 Aug. 2022
Bearbeitet: Ihaveaquest
am 9 Aug. 2022
file = read('file');
pattern = strcmp('9',file);
row = find(pattern==1);
writetable(row,'sampletable.txt')
2 Kommentare
Walter Roberson
am 8 Aug. 2022
Are you starting with a .csv file or a .xlsx file?
Are there multiple columns in the file? Should only one column be examined for a match? Should the entire row with the match be output? Is it possible that multiple rows will match?
Akzeptierte Antwort
Walter Roberson
am 8 Aug. 2022
data = readtable('FileNameGoesHere');
mask = data{:,ColumnNumberGoesHere} == 9;
subset = data(mask,:);
writetable(subset, 'sampletable.txt');
2 Kommentare
Image Analyst
am 8 Aug. 2022
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!