主要内容

本页采用了机器翻译。点击此处可查看英文原文。

mlreportgen.utils.powerpoint 类

命名空间: mlreportgen.utils

PowerPoint 应用程序和演示文稿进行交互

描述

该实用工具提供与 PowerPoint® 应用程序和 PowerPoint 演示文稿交互的方法。这些方法使用 Microsoft .NET 框架的 MATLAB 接口与 PowerPoint 编辑器进行交互。

方法

全部展开

示例

打开 PowerPoint 演示文稿

打开当前工作文件夹中的 test.pptxtest1.pptx PowerPoint 演示文稿。

pptPres = mlreportgen.utils.powerpoint.open("test")
pptPres1 = mlreportgen.utils.powerpoint.open("test1") 
pptPres = 

  PPTPres with properties:
    FileName: "C:\Users\username\Documents\test.pptx"

pptPres1 = 

  pptPres with properties:
    FileName: 'C:\Users\username\Documents\test1.pptx'

获取 PowerPoint 演示文稿文件名

获取打开的 PowerPoint 演示文稿文件的名称。

files = mlreportgen.utils.powerpoint.filenames()
files = 

  1×2 string array

    "C:\Users\username\Documents\test.pptx" ...
    "C:\Users\username\Documents\test1.pptx"

限制

  • mlreportgen.utils.powerpoint 仅在 Microsoft® Windows® 上可用。

  • MATLAB® Web App 不支持 mlreportgen.utils.powerpoint

版本历史记录

在 R2018b 中推出