Find a particular value in an Excel sheet (Activex or xlsread?)

조회 수: 3 (최근 30일)
James Boyle
James Boyle 2017년 8월 1일
댓글: James Boyle 2017년 8월 1일
I'm looking for a way to find the location of a specific element inside an Excel sheet, for example, I need my code to search the sheet for '31.5 Hz' and then output that this is found in cell J27, or wherever. I can't seem to find a simple way of doing this. Any help appreciated! (Windows 10, R2016a)

채택된 답변

Ganesh Hegade
Ganesh Hegade 2017년 8월 1일
You can get the index below way.
[~,txt,~] = xlsread('Filename');
[row,col] = find(cellfun('length',regexp(txt,'31.5 Hz')) == 1);
  댓글 수: 1
James Boyle
James Boyle 2017년 8월 1일
Thanks, I ended up coming up with a long winded method to do it, but this is much faster.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by