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.ColWidth class

Package: mlreportgen.ppt
Superclasses:

Table column width

Description

Width of a table column.

Construction

widthObj = ColWidth() creates a format object that specifies a column width of one inch.

widthObj = ColWidth(value) creates a column width object having the specified width.

Input Arguments

expand all

Width of column, specified in the form valueUnits, where Units is an abbreviation for the width units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Output Arguments

expand all

Column width, returned as an mlreportgen.ppt.ColWidth object.

Properties

expand all

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.

Width of column, specified in the form valueUnits, where Units is an abbreviation for the width units. These abbreviations are valid:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Examples

expand all

Create a presentation.

import mlreportgen.ppt.*
slides = Presentation('myColWidth.pptx');
slide1 = add(slides,'Title and Content');

Create a table and specify that the first column has a width of four inches.

C = {'wide column' 17 'aaaa' 4 5 6 7 8 9 10 11;...
    'long text string' 'bb' 1 3 5 7 9 11 13 15 17;...
    'more text' 1 2 3 4 5 6 7 8 9 10};

t = Table(C);
t.entry(1,1).Style = {ColWidth('4in')};

Replace the slide content with the table, generate the presentation, and open the myColWidth presentation. (The winopen code works on Windows® platforms.)

replace(slide1,'Content',t);
close(slides); 

if ispc
    winopen(slidesFile);
end
Was this topic helpful?