1. 程式人生 > >MatLab MAC/Windows讀寫excel,"Warning: Could not start Excel server for export. XLSWRITE will attempt t

MatLab MAC/Windows讀寫excel,"Warning: Could not start Excel server for export. XLSWRITE will attempt t

windows下excel讀寫

xlsfile='ResultRecord.xlsx';
[OriginData] = xlsread(xlsfile); % 讀
headers = {'a','b','c','d','e'};
xlswrite(xlsfile,headers);
xlswrite(xlsfile,[testdata_p,testdata_w,testdata_output,predict',abs(error)./testdata_output],1,'A2');

mac下

mac讀excel不報異常,如果寫入資料會提示
“Warning: Could not start Excel server for export. XLSWRITE will attempt to write file in CSV format. > In xlswrite (line 174)”
即資料

重點內容不會儲存到excel裡,而是新建一個csv檔案原因是MAC上的office目前不支援COM介面。
所以MAC使用者委曲求全的用csvread/csvwrite吧,csv檔案的應用也很廣泛~