Saving Excel files using xlswrite, actxserver on 64-bit computer with Office 2010
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
0 Kommentare
Antworten (1)
Image Analyst
am 14 Jan. 2013
Bearbeitet: Image Analyst
am 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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!