필터 지우기
필터 지우기

How to only grab *.xls files, not *.xlsx or *.xlsm?

조회 수: 4 (최근 30일)
Calabrese
Calabrese 2017년 6월 22일
댓글: Calabrese 2017년 6월 23일
I am using the following before I run a loop and it is pulling *.xlsm files. Is there a way to cut off the call at *.xls?
SVMS_xls=dir('*.xls');
  댓글 수: 8
dpb
dpb 2017년 6월 23일
I 'spect this 'un is in the realm of crystal ball guesses, though! :)
Calabrese
Calabrese 2017년 6월 23일
I was assuming that the error occurring within a loop was because it was pulling *.xlsm files, seemed plausible at the time. However it was a protected file issue. Thank you everyone for you feedback.

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

채택된 답변

Jan
Jan 2017년 6월 23일
This is not the case in the Matlab versions I know: R5.3, 6.5, 2008a, 2009a, 2011b, 2015b, 2016b, under Windows XP and 7 and Linux. Here dir('*.xls') does not include .xlsm files. Please check your code again.
  댓글 수: 1
Calabrese
Calabrese 2017년 6월 23일
I was assuming that the error occurring within a loop was because it was pulling *.xlsm files, seemed plausible at the time. However it was a protected file issue. Thank you for you feedback.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by