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

1 view (last 30 days)
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 Comments
dpb
dpb on 23 Jun 2017
I 'spect this 'un is in the realm of crystal ball guesses, though! :)
Calabrese
Calabrese on 23 Jun 2017
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.

Sign in to comment.

Accepted Answer

Jan
Jan on 23 Jun 2017
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 Comment
Calabrese
Calabrese on 23 Jun 2017
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.

Sign in to comment.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!