How to export program output into an Excel spreadsheet that is created, named, and located all within the program?
显示 更早的评论
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
2014-1-31
0 个投票
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
2014-1-31
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!