How to compare two different excel sheets specific columns for like values
7 ビュー (過去 30 日間)
表示 古いコメント
I am trying to compare two excel files, specifically a column in each. The cells contain numbers and letters and arent in order. I am trying to update a condensed list to ensure that it has the master's values. It has been a few years since ive used MATLAB. I tried using the setdiff function to compare arrays from each with no luck. TIA!
回答 (1 件)
Ive J
2022 年 1 月 22 日
xlsread is deprecated, avoid it.
fullTab = readtable('File1.xlsx');
denseTab = readtable('File2.xlsx');
[idxFull, idxDense] = ismember(fullTab.(13), denseTab.(3));
idxDense(idxDense < 1) = [];
fullCol13Unique = A.(13)(~idxFull);
参考
カテゴリ
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!