...
...
Example |
---|
Code Block |
---|
| csharp | csharp |
title | C# |
---|
{signature}
{remarks}
Call {{Process}} after [SetDataSource|PowerPointTemplate.BindData] and before [Save|PowerPointTemplate.Save].
You can call {{Process}} only once for each instance of [PowerPointTemplate].
{remarks}
{example}{code:csharp|title=C#}
PowerPointTemplate pptt = new PoweRPointTemplate();
pptt.Open(Application["templatepath"] +
@"\DataBinding\ArrayBindingTemplate2.pptx");
//--- Set a data source for the data marker "SimpleArray."
string[] onedim = {"SoftArtisans", "OfficeWriter", "ExcelTemplate"};
pptt.SetColumnDataSource(onedim, "SimpleArray");
//--- Process the template to populate it with the data source data.
pptt.Process();
//--- Stream the processed document to the client.
pptt.Save(Page.Response, "ArrayBinding.pptx", false);
Code Block |
---|
vbnet | vbnet | title | {code}
{code:vbnet|title=vb.net
}
Dim pptt As New PowerPointTemplate()
pptt.Open(Application("templatepath") & _
"\DataBinding\ArrayBindingTemplate2.pptx")
'--- Set a data source for the data marker "SimpleArray."
Dim onedim As String() = {"SoftArtisans", "OfficeWriter", "ExcelTemplate"}
pptt.SetColumnDataSource(onedim, "SimpleArray")
'--- Process the template to populate it with the data source data.
pptt.Process()
'--- Stream the processed document to the client.
pptt.Save(Page.Response, "ArrayBinding.pptx", False)
{code}
{example}