Dear experiences …
i have multiple csv files in certain folder ("D:\original")(100+), i need to convert these files from csv to xls files and store it in ("D:\master").. i have used the following code but its give me an error in xlsread ..
Error using xlsread (line 128)XLSREAD unable to open file 'c.csv'.File 'C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\c.csv' not found.
the code is in the following:
orginal='D:\original'd=dir([original '\*.csv']);files={d.name};for k=1:numel(files) old_name=files{k}; [~,~,b] = xlsread(old_name) ; new_name=strrep(old_name,'csv','xls') xlswrite(new_name,b);end
thanks
Best Answer