Excel file not found
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How can I make sure that the Excel file is in the current location of Matlab, and in the absence of it I create it from Matlab, the problem arises when I write for the first time . when I read the Excel file for the purpose of determining the current location of the writing, the error appears that the file does not exist (File 'C:\Users\kh\Documents\MATLAB\testall.xlsx' not found.)
for i=1:4
[complete2] = xlsread('testall.xlsx');
lr = size(complete2,1);
range = ['A',num2str(lr+1)];
xlswrite('testall.xlsx',ROIRmom(i).mom,1,range);
end
2 comentarios
Walter Roberson
el 17 de Sept. de 2020
filename = 'testall.xlsx';
if ~exist(filename, 'file')
file does not exist yet, do something
end
[...]
complete2 = xlsread(filename);
[...]
xlswrite(filename, and so on)
Respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!