I want to select an Excel file by it's extension
1 view (last 30 days)
Show older comments
Hi
%% Here only 1 Excel file will be present in ComparySummary folder. And I want select that Excel file with FilePath %%
FilePath = fullfile(pwd,'\CompareSummary\*_*.xlsx');
[~,sheets] = xlsfinfo(FilePath);
But, It is not idenfying *_*, as I am putting it into single quotation marks ' '.
Please let me know what change shall I do here?
Thank you
Please let me know for brief
0 Comments
Answers (1)
KSSV
on 10 Aug 2022
Edited: KSSV
on 10 Aug 2022
%% Here only 1 Excel file will be present in ComparySummary folder. And I want select that Excel file with FilePath %%
FilePath = fullfile(pwd,'\CompareSummary\*.xlsx');
xlFile = dir(FilePath) ;
[~,sheets] = xlsfinfo(fullfile(xlFile(1).folder,xlFile(1).name));
See Also
Categories
Find more on Data Import from MATLAB 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!