Error opening Excel file in Matlab using actxserver

조회 수: 29 (최근 30일)
Sidhhant Nayak
Sidhhant Nayak 2019년 9월 5일
댓글: Sidhhant Nayak 2019년 9월 5일
Hello all,
I am trying to edit and excel file by opening it via the 'actxserver' functionality. However, an error always throws up as soon as I run the following command:
excel = actxserver('Excel.application')
workbook = excel.Workbooks.Open('EA988_15Fe_Gen4v1_#14mix_200ml_105411.6_Cooldown_2.xlsx');
Error using
Interface.000208DB_0000_0000_C000_000000000046/Open
That is all what I get from Matlab. I have referred to multiple threads regarding this issue but none of them have been helpful. Can someone help me with resolving this issue?
Thanks in advance.
Best regards,
Sidhhant

채택된 답변

Cris LaPierre
Cris LaPierre 2019년 9월 5일
I think you need to include the entire path in the filename.
file = 'C:\user\me\Documents\example.xls';
excel = actxserver('Excel.Application');
workbook = excel.Workbooks.Open(file)
...
delete(excel);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by