Main Content

mlreportgen.dom.TableEntry class

Package: mlreportgen.dom

Description

Specifies the content and style of a table entry.

Tip

To specify formatting for all table entries in a table, use the TableEntriesStyle property of the Table or FormalTable object. For example, you can set border formatting.

import mlreportgen.dom.*
t = Table(magic(5));
t.TableEntriesStyle = {Border('solid','black','1')};

Properties you set for a TableEntry object take precedence over TableEntriesStyle format objects.

The mlreportgen.dom.TableEntry class is a handle class.

Creation

Description

entryObj = TableEntry() creates an empty table entry.

entryObj = TableEntry(text) creates a table entry using the specified text. The constructor creates a text object and appends it to the table entry. In Microsoft® Word and PDF output, text in a table entry is wrapped in a paragraph because Word and PDF do not permit unwrapped text in table entries. In HTML output, the text is not wrapped in a paragraph.

entryObj = TableEntry(text,styleName) creates a table entry containing specified text using the specified style.

entryObj = TableEntry(domObj) creates a table entry containing domObj, where domObj is a DOM object such as an mlreportgen.dom.Paragraph object.

Input Arguments

expand all

Text for the table entry, specified as a character vector.

Text for the table entry, specified as an mlreportgen.dom.Text object.

The style specified by styleName must be defined in the template of the document to which this table is appended.

Objects to include in the table, specified as a DOM object. The valid DOM objects are:

  • mlreportgen.dom.Paragraph

  • mlreportgen.dom.Text (CharEntity included)

  • mlreportgen.dom.Image

  • mlreportgen.dom.Table

  • mlreportgen.dom.OrderedList

  • mlreportgen.dom.UnorderedList

  • mlreportgen.dom.CustomElement

Properties

expand all

Type of border to draw, specified as one of the values in the table.

Border ValueDescriptionSupported Output Types

'dashed'

Dashed line

All output types

'dashdotstroked'

Line with alternating diagonal dashes and dot

Word

'dashsmallgap'

Dashed line with a small gap between dashes

Word

'dotted'

Dotted line

All output types

'dotdash'

Line with alternating dots and dashes

Word

'dotdotdash'

Line with alternating double dots and a dash

Word

'double'

Double line

All output types

'doublewave'

Double wavy line

Word

'groove'

3-D effect grooved line

HTML and PDF

'hidden'

No line

The 'none' border type also produces no line. However, conflicting borders are handled differently for 'hidden' types than for 'none' types. The 'hidden' border type takes precedence over a conflicting border type. A conflicting border type takes precedence over the 'none' type.

HTML and PDF

'inset'

3-D effect line

All output types

'none'

No line

The 'hidden' border type also produces no line. However, conflicting borders are handled differently for 'hidden' types than for 'none' types. The 'hidden' border type takes precedence over a conflicting border type. A conflicting border type takes precedence over the 'none' type.

All output types

'outset'

3-D effect line

All output types

'ridge'

3-D effect ridged line

HTML and PDF

'single'

Single line

Word

'solid'

Single line

HTML and PDF

'thick'

Thick line

Word

'thickthinlargegap'

Dashed line with alternating thick and thin dashes with a large gap

Word

'thickthinmediumgap'

Dashed line with alternating thick and thin dashes with a medium gap

Word

'thickthinsmallgap'

Dashed line with alternating thick and thin dashes with a small gap

Word

'thinthicklargegap'

Dashed line with alternating thin and thick dashes with a medium gap

Word

'thinthickmediumgap'

Dashed line with alternating thin and thick dashes, with a medium gap

Word

'thinthicksmallgap'

Dashed line with alternating thin and thick dashes with a small gap

Word

'thinthickthinlargegap'

Dashed line with alternating thin and thick dashes with a large gap

Word

'thinthickthinmediumgap'

Dashed line with alternating thin and thick dashes with a medium gap

Word

'thinthickthinsmallgap'

Dashed line with alternating thin and thick dashes with a small gap

Word

'threedemboss'

Embossed effect line

Word

'threedengrave'

Engraved effect line

Word

'triple'

Triple line

Word

'wave'

Wavy line

Word

Border color, specified as either:

Table border width, 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

Children of this document element, specified as an array of DOM objects. This property is read-only.

Number of table columns spanned by the table entry, specified as a double.

Data Types: double

The custom attributes must be supported by the output type of the document to which this document element is appended.

Type of hyphenation, specified as one of these values:

  • true — Enables hyphenation and uses '-' for the hyphenation character.

  • '-' — Enables hyphenation and uses '-' for the hyphenation character.

  • ' ' — Enables hyphenation and uses a space (' ') for the hyphenation character

  • false — Disables hyphenation.

ID for this document element, specified as a character vector or string scalar. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Inner margin in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • no abbreviation — pixels

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

  • px — pixels

Parent of this document element, specified as a DOM object. This property is read-only.

Attributes:

GetAccess
public
SetAccess
private
NonCopyable
true

Number of table rows spanned by the table entry, specified as a double.

Data Types: double

Array of format objects (such as Bold objects) that specify the format for this table.

This property overrides corresponding formats defined by the style sheet style specified by the StyleName property.

Name of a style specified in the style sheet of the document or document part to which this table is appended

The style that specifies the appearance of this table in the output document, for formats not specified by Style property.

Tag for this document element, specified as a character vector or string scalar.

The DOM generates a session-unique tag as part of the creation of this object. 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. Specifying your own tag value can help you to identify where an issue occurred during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Vertical alignment table cell content, specified as one of these values:

  • 'top'

  • 'bottom'

  • 'middle'

Methods

expand all

Version History

Introduced in R2014a