append
Class: mlreportgen.ppt.TableEntry
Namespace: mlreportgen.ppt
Append text or paragraph to table entry
Description
appends
text or a tableEntryObj
= append(tableEntry
,content
)Paragraph
object to a table entry.
Examples
Create a Table with Table Rows and Entries
Create a presentation.
import mlreportgen.ppt.* ppt = Presentation('myTableEntryPresentation.pptx'); open(ppt); add(ppt,'Title and Content');
Create a table with three columns.
table1 = Table(3);
Create the first table row.
tr1 = TableRow(); tr1.Style = {Bold(true)};
Create three table entries for the first row.
te1tr1 = TableEntry(); p = Paragraph('first entry'); p.FontColor = 'red'; append(te1tr1,p); te2tr1 = TableEntry(); append(te2tr1,'second entry'); te3tr1 = TableEntry(); te3tr1.Style = {FontColor('green')}; append(te3tr1,'third entry');
Append the table entries to the first row.
append(tr1,te1tr1); append(tr1,te2tr1); append(tr1,te3tr1);
Create the second table row.
tr2 = TableRow();
Create three table entries for the second row.
te1tr2 = TableEntry(); te1tr2.Style = {FontColor('red')}; p = Paragraph('first entry'); append(te1tr2,p); te2tr2 = TableEntry(); append(te2tr2,'second entry'); te3tr2 = TableEntry(); te3tr2.Style = {FontColor('green')}; append(te3tr2,'third entry');
Append the table entries to the second row.
append(tr2,te1tr2); append(tr2,te2tr2); append(tr2,te3tr2);
Append the table rows to the table.
append(table1,tr1); append(table1,tr2);
Use the mlreportgen.ppt.Presentation.find
method
to find the slides that have a Content
placeholder.
In this case, there are two.
contents = find(ppt,'Content');
Replace the table in the second slide with table1
.
replace(contents(1),table1);
Generate the presentation. Open myTableEntryPresentation.pptx
.
On a Windows® platform, you can open the presentation in MATLAB®:
close(ppt); rptview(ppt);
Input Arguments
tableEntry
— Table entry to append content to
mlreportgen.ppt.TableEntry
object
Table entry to append content to, specified as an mlreportgen.ppt.TableEntry
object.
content
— Content to append to table entry
character vector | mlreportgen.ppt.Paragraph
object
Content to append to a table entry, specified as a character
vector or one or more mlreportgen.ppt.Paragraph
objects.
Output Arguments
paragraph
— Content appended to table entry
mlreportgen.ppt.Paragraph
object
Content appended to table entry, returned as an mlreportgen.ppt.Paragraph
object.
Version History
Introduced in R2015b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)