append
クラス: mlreportgen.ppt.TableRow
名前空間: mlreportgen.ppt
テーブル行へのテーブル エントリの追加
説明
は、テーブル行にテーブル エントリを追加します。tableEntryObj
= append(tableRow
,entry
)
例
テーブル行とテーブル エントリをもつテーブルの作成
プレゼンテーションを作成します。
import mlreportgen.ppt.* ppt = Presentation('myTableEntryPresentation.pptx'); open(ppt); add(ppt,'Title and Content');
3 つの列をもつテーブルを作成します。
table1 = Table(3);
最初のテーブル行を作成します。
tr1 = TableRow(); tr1.Style = {Bold(true)};
最初の行の 3 つのテーブル エントリを作成します。
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(tr1,te1tr1); append(tr1,te2tr1); append(tr1,te3tr1);
2 番目のテーブル行を作成します。
tr2 = TableRow();
2 番目の行の 3 つのテーブル エントリを作成します。
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');
2 番目の行にテーブル エントリを追加します。
append(tr2,te1tr2); append(tr2,te2tr2); append(tr2,te3tr2);
テーブル行をテーブルに追加します。
append(table1,tr1); append(table1,tr2);
mlreportgen.ppt.Presentation.find
メソッドを使用して、Content
プレースホルダーをもつスライドを検索します。この場合、2 つあります。
contents = find(ppt,'Content');
2 番目のスライドのテーブルを table1
に置き換えます。
replace(contents(1),table1);
プレゼンテーションを生成します。myTableEntryPresentation.pptx
を開きます。Windows® プラットフォームでは、このプレゼンテーションを MATLAB® で開くことができます。
close(ppt); rptview(ppt);
入力引数
tableRow
— コンテンツを追加するテーブル行
mlreportgen.ppt.TableRow
オブジェクト
コンテンツを追加するテーブル行。mlreportgen.ppt.TableRow
オブジェクトとして指定します。
entry
— テーブル行に追加するテーブル エントリ
mlreportgen.ppt.TableEntry
オブジェクト
テーブル行に追加するテーブル エントリ。mlreportgen.ppt.TableEntry
オブジェクトとして指定します。
出力引数
tableEntryObj
— テーブル エントリ
mlreportgen.dom.TableEntry
オブジェクト
テーブル エントリ。mlreportgen.dom.TableEntry
オブジェクトとして返されます。
バージョン履歴
R2015b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)