フィルターのクリア

Issue with XLSWRITE on Linux (Red Hat)

4 ビュー (過去 30 日間)
prash
prash 2018 年 5 月 8 日
回答済み: Wasim Aftab 2019 年 7 月 8 日
I am trying to write some data to Excel using "xlswrite" (Matlab R2015b). It works fine on Window machine but on Linux (Red Hat) I get error " Error using dlmwrite (line 112) The input cell array cannot be converted to a matrix."
Then I commented that line and tried to write regular array. matlab writes in CSV format.
I have "Libre Office " installed on linux which I can use to open the excel.
I even tried "XLWRITE" from mathwork file exchange- I got error
" Error using dlmwrite (line 112) The input cell array cannot be converted to a matrix." I believe it is related to JAVA

回答 (2 件)

Walter Roberson
Walter Roberson 2018 年 5 月 8 日
This has nothing to do with java.
xlswrite() tries to use ActiveX to talk to Excel. If it cannot do that (not a Windows machine, or Excel not installed) then it tries to write as CSV, which it can only do for pure numeric data.
I recommend that you switch to writetable(), which is able to write .xls and .xlsx files on Mac and Linux
  2 件のコメント
prash
prash 2018 年 5 月 8 日
I am getting another error with writetable "Could not start Excel server for export - export to text file instead"
Walter Roberson
Walter Roberson 2018 年 5 月 8 日
Use the Java API inside MATLAB to write to the file.

サインインしてコメントする。


Wasim Aftab
Wasim Aftab 2019 年 7 月 8 日
Why not using writetable(data, 'filename.xlsx')?

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by