mlreportgen.dom.TableEntry Class
Namespace: mlreportgen.dom
Table entry
Description
Use an object of the mlreportgen.dom.TableEntry class to specify the content and style of a table entry.
To see what DOM objects you can append an mlreportgen.dom.TableEntry object to,
see Append mlreportgen.dom.TableEntry object to DOM class object.
The mlreportgen.dom.TableEntry class is a handle class.
Creation
Description
creates an
empty table entry.entryObj = TableEntry
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)
creates a table entry containing entryObj = TableEntry(domObj)domObj, where
domObj is a DOM object such as a mlreportgen.dom.Paragraph
object.
Input Arguments
Properties
Methods
More About
Tips
To specify formatting for all table entries in a table, adjust the
TableEntriesStyleproperty of themlreportgen.dom.Tableormlreportgen.dom.FormalTableobject. 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
mlreportgen.dom.TableEntryobject take precedence overmlreportgen.dom.TableEntriesStyleformat objects.To avoid table formatting errors, create table rows that span the same number of cells, regardless of the number of table entries. For example, the first row in this table has two table entries. The first entry,
Winter, spans two columns and the second entry,Spring, spans one column. The second row has three entries that each span one column.
If you modify only the second row of the table so that the first two entries,
JaunaryandFebruary, each span two columns, and the last entry spans one column, the table format changes.
When you include large content in a table entry, the table may not fit on a report page. If a table cannot fit on a DOCX report page, Microsoft Word cannot open the report. To ensure that your table fits in a DOCX report, set the width and height of table entries with large content. To set the width, use the
mlreportgen.dom.Widthclass. To set the height, use themlreportgen.dom.Heightclass. To avoid deleting existing formats, concatenate the new table entry style with the existing style:To apply the format to all table entries in a table, use thete = TableEntry(domObj); te.Style = [te.Style, {Width("1in"), Height("1in")}]; append(row,te);TableEntriesStyleproperty of the table object.
Version History
Introduced in R2014a