I have a loop that reads tables from several excel files in a folder. However I get the following error:
Unable to open file 'C:\MATLAB\Data\fish\~$volume022017.xlsx' as a workbook. Check that the file exists, read access is available, and the file is a valid spreadsheet file.
I suspect that this is a temporary file (which I am unable to see in explorer). The list of files is created using 'dir':
filesData = [dir([folder,'\*.xlsx']);dir([folder,'\*.xls'])];
filenames = {filesData.name}';
'filenames' also does not list this file.
I then use
tmpTable=readtable( [folder, filenames{i}],'sheet',Tabs{term},'ReadRowNames',true);
which gives the error.