필터 지우기
필터 지우기

Saving Excel files using xlswrite, actxserver on 64-bit computer with Office 2010

조회 수: 1 (최근 30일)
A user is having trouble saving Excel reports from a compiled Matlab software. He has a 64-bit Windows 7 computer with Office 2010.
I have tried the program on the following and saved Excel sheets successfully: - 32-bit with Office 2010 - 64-bit with Office 2007 - 32-bit with Office 2007
He's getting an error that says "Cannot find an exact (case-sensitive) match for 'Open'. The closest match is: open in C:\Program Files\MATLAB\MATLAB Compiler Runtime\..."
There was a line in the code to save the Excel sheet: "Workbook = invoke(Workbooks,'Open',fullfile(pathName,fileName));" so I switched it to 'open' instead, but he said he got the same problem. The error does not show which line in the code is causing the error.
This error shows up when the user tries to save the file using either actxserver or xlswrite.
Any help would be appreciated. I'm stumped.

답변 (1개)

Image Analyst
Image Analyst 2013년 1월 14일
편집: Image Analyst 2013년 1월 14일
Try the non-invoke method and see if that works:
fullFileName = fullfile(pathName,fileName);
Excel.Workbooks.Open(fullFileName);
It works for me (with a capital O). The text "Cannot find an exact (case-sensitive) match..." is usually a warning, not a fatal error, and the code should proceed. Perhaps it's some other open(). Can you do "which -all open" on the computer that you compiled it on to see if there are any other open functions lurking around.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by