Error using export function
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone, I'm trying to export a file to excel (I'm using a MacBook and I have the licence for excel) using the function export. The code I wrote is the following:
export(SumStats.statsDR,'XLSFile','SumStats.statsDR.xlsx')
However, Matlab gives me the following error:
Error using dataset/export (line 108) Could not start Excel server for export. Export to a text file instead.
Error in untitled (line 227) export(SumStats.statsDR,'XLSFile','SumStats.statsDR.xlsx');
Is someone able to tell me what is wrong there? Or how I can export the file to a txt file using the same function 'export'?
Thanks for the help.
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 2 月 26 日
You can only export to xls or xlsx if you are using MS Windows with Excel installed. There is no Mathworks provided method to write xls or xlsx on OS-X, no matter whether you have Excel or not. (This is because the export method requires using ActiveX to communicate with Excel.)
You may wish to try out http://www.mathworks.com/matlabcentral/fileexchange/38591-xlwrite--generate-xls-x--files-without-excel-on-mac-linux-win from the File Exchange
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!