How to use actxserver to open Excel 2010 Application Object? (Both Excel 2003 and 2010 installed)
1 次查看(过去 30 天)
显示 更早的评论
I have Excel 2003 and Excel 2010 installed. Both are 32-bit. MATLAB is R2013a (win64).
When I use actxserver to implement and Excel Application object,I believe that it implements the Excel 2003 Application Object:
>> e = actxserver('Excel.Application')
COM.Excel_Application
>> e.get
.
.
.
Workbooks: [1x1 Interface.Microsoft_Excel_11.0_Object_Library.Workbooks]
.
.
.
LibraryPath: 'C:\Program Files (x86)\Microsoft Office\OFFICE11\LIBRARY'
.
.
.
Path: 'C:\Program Files (x86)\Microsoft Office\OFFICE11'
.
.
.
It seems to reference Office and Excel 11 alot, which (if I'm not mistaken) are Office and Excel 2003.
(also Office 12 = Office 2007, and Office 14 = Office 2010, according to minimal online research http://answers.microsoft.com/en-us/office/forum/office_2010-office_install/office11-office12-and-office14/92a0087e-402c-48e7-a804-026e7ecb0e04?msgId=0e9d6b43-bc44-4033-90b9-7beb1a97e2b4)
Would there be a way to use the actxserver command or to change a MATLAB/system setting so that MATLAB could make the distinction between Excel 2003 and Excel 2010?
Thanks in advance.
1 个评论
Robert Jones
2013-9-26
Actually, NONE of my matlab calling to excel work with Excel 2013! Still looking for help.
回答(2 个)
Image Analyst
2013-9-18
I think it just brings up whatever one it thinks is the official installed version. You should probably uninstall the old Offices and re-install the new one. That will probably fix it.
0 个评论
Kaustubha Govind
2013-9-27
MATLAB just starts up the version that is set up as the COM Automation Server with that Application ID, with the OS. You may want to read Office automation when multiple versions of Office are installed.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!