【发布时间】:2018-07-19 13:06:50
【问题描述】:
我正在尝试将我在 Python 中创建的程序迁移到 MATLAB。此应用程序使用 win32COM 向 Excel 和 PowerPoint 写入/读取/读取,我假设 ActiveX 命令非常相似/相同,因为它基于 VBA。如果有人能阐明这一点并帮助解决以下错误,我将不胜感激!
所以我有一个可以工作的 Python 代码
PPT_App = win32com.client.Dispatch("PowerPoint.Application")
Presentation = PPT_App.Presentations.Add()
Cover_Slide = Presentation.Slides.Add(1,12)
但是,当我将其转换为 MATLAB 时;
PPT_App = actxserver('PowerPoint.Application');
Presentation = PPT_App.Presentations.Add();
Cover_Slide = Presentation.Slides.Add(1,12);
它在定义“Cover_Slide”的第 3 行给了我这个错误;
Undefined function 'Add' for input arguments of type 'Interface.91493469_5A91_11CF_8700_00AA0060263B'.
有人知道为什么会发生这种情况,或者我在哪里可以找到有关 ActiveX 差异的信息?
【问题讨论】:
标签: python matlab powerpoint activex win32com