24. Introduction to automation

think-cell helps you to quickly create professional, data-driven charts in PowerPoint. But what about automating periodic reports, or using a web service to create charts based on your parameters, or exporting your business intelligence reports as PowerPoint slides? Using think-cell’s automation, you can do this quickly with your Excel or JSON data, and without the mistakes commonly found in a manual process. All you need is:

  1. A PowerPoint presentation with think-cell charts.
  2. Programmatic logic to control the automation.

Let’s begin by creating a PowerPoint presentation with a think-cell chart and a text box for the slide title as an automation template:

  1. Create a chart in PowerPoint as described in 4. Introduction to charting and later chapters. Any think-cell chart type will work, including all decorations like axes and difference arrows.

    think-cell template chart for automation with no name.

    The initial data is not important as it will later be replaced programmatically by the real data.

  2. In the contextual toolbar of the chart, click on the field that says UpdateChart Name.
  3. Enter a unique name, e.g., Chart1, which you will refer to later.

    think-cell template chart for automation with name.

  4. Where the slide title should appear on the slide, insert a Named Text Field icon. Named Text Field from the Elements menu.
  5. In the contextual toolbar of the text field, click on the field that says UpdateChart Name.
  6. Enter a unique name, e.g., Title, which you will refer to later.

    think-cell template text field for automation with name.

  7. Save the presentation, e.g., as template.pptx.

The next step is to create programmatic logic which will merge your Excel or JSON data with the template slide.

With the process above you can create presentations with arbitrary combinations of think-cell charts. You can prepare a library of all the chart types you need and, as required, versions with different chart decorations enabled. Then, you can freely combine these templates and supply them with data for use in a new presentation using either Excel or JSON.

Note:

This approach replaces the need for a general API to create charts and add chart decorations, which is not supported.

Share