連接:https://ww2.mathworks.cn/help/matlab/ref/writetable.htmlhtml
函數:writeable;writeable;writematrix;xlswrite(不推薦)函數
語法:spa
writeable |
writeable |
writematrix |
|
|
|
writetable(T,'myData.xls','Sheet',1,'Range','B2:F6')excel
注意:T的數據類型是cellcode
matlab 數據轉換:
htm
%獲取文件夾下全部jpg文件的名稱,而後寫入excel文件 %獲取文件名稱 filepath = 'D:\Users\zhuyingdi\Desktop\表彰\*.jpg'; fileinfo = dir(filepath);%獲取文件的全部信息 len = length(fileinfo); write_filename = '11.xls'; for i = 1:len T = fileinfo(i).name; C = cellstr(T); i1 = num2str(i); cell = strcat('A',i1); writecell(C,write_filename,'Sheet',1,'Range',cell); end