xlsread Error: Object returned error code: 0x800A03EC
Mostrar comentarios más antiguos
Good morning,
I know there are a few questions already answered on this topic, but my problem is a little different and I've tried all the possible solutions given in those threads.
I am using Matlab R2020b, which should be the latest version. I wrote a script months ago which was using xlsread to read from excel spreadsheets that were in the csv format. That worked good and i managed to import all data and make all the analysis. After months I re-opened the file and run it. This is the error it gives me:
Error using xlsread (line 257)
Error: Object returned error code: 0x800A03EC
and the code is
files=dir('C:\Users\Name\Folder1\Folder2\Folder3\*.csv'); % Identifies the .csv files of the specified folder
for i=1:sum(~cellfun(@isempty,{files.name}))
[~, ~, excel{i}]=xlsread(fullfile(files(i).folder,files(i).name));
parameters{i} = excel{i}(1,:);
namestruct{i}=strcat('M',files(i).name(1:end-4));
data.(namestruct{i}) = cell2mat(excel{i}(2:end,:));
end
I want to specify that nothing has changed, neither the extension of Excel files, nor the Matlab version. I also tried to use the function in a much more simpler script, where excel file was just a column and placed in the same folder as the script, and without a for loop.
I also know that is now advised to use readtable function, but I have ten different scripts that uses xlswrite function which was very useful for me and I don't want to change them.
Does anybody know why this function is not working anymore for me?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!