Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.TablePlaceholder class

Package: mlreportgen.ppt
Superclasses:

Slide placeholder to replace with table

Description

Slide placeholder to replace with a table. You can create a table placeholder using a layout slide. In the default PPT API, when you add a Title and Table slide to a presentation, the API creates a TablePlaceholder object. Use the find method with the slide object to find the picture placeholder. You can then set properties for the TablePlaceholder object.

Use the PowerPoint® editor to insert a picture placeholder in a presentation:

  1. Select the Slide Master tab.

  2. Click the layout slide you want to add the picture placeholder to. You can add the placeholder to an existing or a new layout slide.

  3. In the toolbar, click Insert Placeholder and select Table.

Properties

expand all

Table placeholder name, specified as a character vector.

Upper-left x-coordinate position of placeholder, specified

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Upper-left y-coordinate position of placeholder, specified in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Width of placeholder, specified in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Height of placeholder, specified in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Table placeholder formatting. This property is ignored.

This read-only property lists child elements that the object contains, specified as a cell array.

This read-only property lists the parent of this object, specified a PPT object.

ID for PPT API object, specified as a character vector. A session-unique ID is generated as part of object creation. You can specify an ID to replace the generated ID.

Tag for this PPT API object, specified as a character vector. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object.

An example of a reason for specifying your own tag value is to make it easier to identify where an issue occurred during presentation generation.

Methods

Method

Purpose

replace

Replace table placeholder with table.

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myTablePlaceholderPresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Title and Table');

Create a table.

table1 = Table(magic(9));

The Title and Table layout includes an object named Table. Use the mlreportgen.ppt.Slide.find method to find an object with the Name property of Table.

contents = find(slide1,'Table');

Replace the table placeholder with the table.

replace(contents(1),table1);

Close the presentation to generate the output.

close(slides);

Open myTablePlaceholderPresentation.pptx. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc
    winopen(slidesFile);
end

Introduced in R2015b

Was this topic helpful?