フィルターのクリア

How to export program output into an Excel spreadsheet that is created, named, and located all within the program?

2 ビュー (過去 30 日間)
Mark
Mark 2014 年 1 月 31 日
回答済み: Image Analyst 2014 年 1 月 31 日
I am trying to export the output of my Matlab program into an Excel spreadsheet. Ideally, the spreadsheet would be created, named, and located all within the program. I've defined a filename, filepath, and variable:
xlswrite (filename, variable);
winopen (filepath);
But I get the popup error message "Cannot use object linking and embedding" and the console error message "Warning: Could not start Excel server for output".
Do you know of a way to cleanly export program output into a spreadsheet? Additionally, do you know of a way to define a specific location for the spreadsheet (in order to avoid further errors, I could only path the file to where I had originally installed Matlab)?

回答 (2 件)

Shivaputra Narke
Shivaputra Narke 2014 年 1 月 31 日
Currnetly I dont know about OLE(Obbject linking and embedding)issue.
In case you want to write at specific location then you must write xlswrite(FileName,Variable,SheetName,StartPosn));
here StartPosn is lets say you want to add your variables content at E column and 5th row then write StartPosn as 'E5'.

Image Analyst
Image Analyst 2014 年 1 月 31 日
Are you willing to learn ActiveX programming? If so, see the attached example. You can open Excel, toss your data in there, and then just leave it open by getting rid of the Excel.quit method call. The user can then pop open Excel from the task bar and close it when they want to.

カテゴリ

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