Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

The Process method replaces the template's data markers with actual values from the data sources, and creates the output file (the new presentation file) in memory. The Save method can then save the output file to disk, stream it to the browser, or both.

Signature
C#
C#
public void Process()
Signature
vb.net
vb.net
Public Sub Process()
Remarks

Call Process after SetDataSource and before Save.

You can call Process only once for each instance of PowerPointTemplate.

Example
Code Block
csharp
csharp
titleC#

          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
titlevb.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)