Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
//The values to display
//This presentation is for a project proposal for a surgery scheduling software
object[] valuesArray = { "ProjectSurgery NameSchedule", "Project DateJanuary 1, 2014", "Under Review", "LeaderPamela NameBlythe", "Start DateJanuary 1, 2015", "Cost6 Estimatemonths", "Project SummarySoftware to schedule surgeries that require multiple resources such as surgeons, assistants, nurses, pre-op and post-op space, surgery theater, long-term recovery rooms." };

#. Create a second array that contains the column names. The column names values must match the data markers in the template.

Code Block
//The column names are the same as the data markers
string[] columnNamesArray = { "Name", "Date", "ReviewStatus", "Leader", "Start", "Estimate", "Summary" };

#. Bind the data to the template. Make sure the data source name is the same as the name used in the template.

...

Code Block
PowerPointTemplate pptt = new PowerPointTemplate();
pptt.Open(Page.MapPath("//templates//part1_template.pptx"));
DataBindingProperties dataProps = pptt.CreateDataBindingProperties();
object[] valuesArray = { "ProjectSurgery NameSchedule", "Project DateJanuary 1, 2014", "Under Review", "LeaderPamela NameBlythe", "Start DateJanuary 1, 2015", "Cost6 Estimatemonths", "Project SummarySoftware to schedule surgeries that require multiple resources such as surgeons, assistants, nurses, pre-op and post-op space, surgery theater, long-term recovery rooms." };
string[] columnNamesArray = { "Name", "Date", "ReviewStatus", "Leader", "Start", "Estimate", "Summary" };
pptt.BindData(valuesArray, columnNamesArray, "Proposal", dataProps);
pptt.Process();
pptt.Save(Page.Response, "Part1_Output.xlsx", false)

...