How can I open a generic EXCEL file ?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
the procedure to access a spreadsheet data from MATLAB running an Excel application in an Automation server is well known and explained at the matlab Documentation. As an example, something like this is seen:
exl = actxserver('excel.application');
exlWkbk = exl.Workbooks;
exlFile = exlWkbk.Open([docroot '/techdoc/matlab_external/examples/input_resp_data.xls']);
I need to open a generic file from Excel (something you wold do otherwise at the Command Window through winopen(cd) ). I would like to have the possibility to chose the file and don't let it fix.
Thank you.
0 个评论
回答(1 个)
Meade
2018-6-22
Hope this helps.
Best, Meade
exl = actxserver('excel.application');
% Open a new workbook
exlWkbk = exl.workbooks.Add;
% To save (if you choose)
exlWkbk.SaveAs(filename);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!