mlreportgen.ppt.TablePlaceholder 类
命名空间: mlreportgen.ppt
幻灯片表格占位符
描述
mlreportgen.ppt.TablePlaceholder 类的对象代表幻灯片中的表占位符。
当您向演示文稿添加幻灯片并且幻灯片布局具有表占位符时,PPT API 会创建一个 TablePlaceholder 对象。在默认的 PPT API 中,Title and Table 布局有一个表占位符。
要查找 TablePlaceholder 对象,请使用包含表占位符的幻灯片的 find 方法。要用表替换表占位符,请使用 TablePlaceholder 对象的 replace 方法。replace 方法用 mlreportgen.ppt.Table 对象替换 TablePlaceholder 对象。
您可以使用 TablePlaceholder 对象的属性来指定替换表的位置或大小。但是,文本格式属性被忽略。要格式化用于替换 TablePlaceholder 对象的表,请使用 Table 对象的属性。
mlreportgen.ppt.TablePlaceholder 类是一个 handle 类。
属性
方法
示例
提示
当您用演示文稿中的表替换表占位符,然后将该演示文稿用作新演示文稿的模板时,PPT API 会为新演示文稿中的表创建一个
mlreportgen.ppt.TemplateTable对象。请参阅添加或替换表格。要查看 PPT API 为幻灯片对象创建的占位符对象,请查看幻灯片的
Children属性。例如,当您向演示文稿添加Title and Table幻灯片时,Children属性是一个包含mlreportgen.ppt.TextBoxPlaceholder对象和mlreportgen.ppt.TablePlaceholder对象的数组。ppt = mlreportgen.ppt.Presentation("test.pptx"); open(ppt); slide = add(ppt,"Title and Table"); slide.Children(1)
ans = TextBoxPlaceholder with properties: Bold: [] Font: [] ComplexScriptFont: [] FontColor: [] FontSize: [] Italic: [] Strike: [] Subscript: [] Superscript: [] Underline: [] BackgroundColor: [] VAlign: [] Name: 'Title' X: [] Y: [] Width: [] Height: [] Style: [] Children: [] Parent: [1×1 mlreportgen.ppt.Slide] Tag: 'ppt.TextBoxPlaceholder:6:7' Id: '6:7'slide.Children(2)
ans = TablePlaceholder with properties: Bold: [] Font: [] ComplexScriptFont: [] FontColor: [] FontSize: [] Italic: [] Strike: [] Subscript: [] Superscript: [] Underline: [] BackgroundColor: [] VAlign: [] Name: 'Table' X: [] Y: [] Width: [] Height: [] Style: [] Children: [] Parent: [1×1 mlreportgen.ppt.Slide] Tag: 'ppt.TablePlaceholder:7:8' Id: '7:8'
版本历史记录
在 R2015b 中推出
