Search for excel spreadsheet with name or symbol

1 次查看(过去 30 天)
I am working with Guide and looking for the code that can help me search particular excel spreadsheet. suppose there are 7 sheets with names.. Circle..Parabola..Triangle..~Data1..~Data2..Ellipse..~Data3
Now what i want is that..code should search for only spreadsheet starting with symbol '~' (tilde). so I could load data only from Spreadsheets ~Data1 ~Data2 ~Data3 and so on and also numbering of these sheets is random since am having 50 excel files with ~Data1 to ~Data15 spreadsheets. hence xlsread(..,sheet) this does not work. Glad to know if its possible.

采纳的回答

Jan
Jan 2017-10-24
The function xlsfinfo gives you a list of the sheet names:
[status, sheets] = xlsfinfo(filename);
Then find the sheet names starting with a ~:
sheetIndex = find(strncmp(sheets, '~', 1));
Now you can load this sheets:
for iSheet = sheetIndex % Perhaps sheetIndex(:).'
Data = xlsread(FileName, iSheet);
...
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Export to MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by