Clear Filters
Clear Filters

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

1 view (last 30 days)
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.

Answers (1)

Image Analyst
Image Analyst on 14 Jan 2013
Edited: Image Analyst on 14 Jan 2013
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.

Community Treasure Hunt

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

Start Hunting!