Page tree

Versions Compared

Key

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

...

Code Block
//Code from Part 1
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);
//Code from Part 2
DataTable dtTeam = GetCSVData(Page.MapPath("//data//Team.csv"));
DataTable dtCost = GetCSVData(Page.MapPath("//data//Cost.csv"));
dataProps.MaxRowsPerSlide = 10;
pptt.BindData(dtTeam, "Team", dataProps);
pptt.BindData(dtCost, "Cost", dataProps);
pptt.Process();
//Code from Part 3
PowerPointApplication ppta = new PowerPointApplication();
Presentation pres = ppta.Open(pptt);
pres.Slides.Delete(numSlides - 1)
ppta.Save(pres, Page.Response, "Part2_Output.pptx", false);

...