Page tree

Versions Compared

Key

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

...

Intro

Excerpt

This guide will explain how to import a multiple rows of values into a PowerPoint presentation using data markers. This assumes a basic understanding of data markers.

 

Jump to:

Table of Contents
maxLevel4
minLevel2

In order to import multiple rows of data into a presentation, two conditions must be met:

1. The data source must contain multiple rows of data

2. The template must be designed to repeat a list entry, a table row, or an entire slide If both of these conditions are not met, then PowerPointWriter's automatic repeating behavior will not occur.

Data Sources

PowerPointTemplate has a single method for binding data to the data markers that are located in the template: {{[PowerPointTemplate.BindData]}}.

...

Depending

...

on

...

the

...

data

...

source

...

type

...

and

...

the

...

number

...

of

...

rows

...

in

...

the

...

data

...

source,

...

PowerPointWriter

...

will

...

either

...

import

...

a

...

[single

...

row|Importing

...

a

...

Single

...

Row

...

of

...

Data]

...

of

...

data

...

or

...

import

...

multiple

...

rows

...

by

...

repeating

...

sections

...

of

...

the

...

presentation.

...

If

...

the

...

data

...

source

...

only

...

has

...

1

...

row

...

or

...

the

...

[maximum

...

number

...

of

...

rows|DataBindingProperties.MaxRowsToImport]

...

to

...

import

...

has

...

been

...

set

...

to

...

1,

...

then

...

PowerPointWriter

...

will

...

not

...

repeat

...

any

...

part

...

of

...

the

...

presentation.

...

Repeating

...

a

...

list

...

entry

...

or

...

table

...

row

...

Template

...

Setup

...

If

...

a

...

data

...

marker

...

is

...

in

...

a

...

list

...

entry

...

(i.e.

...

bullet

...

point)

...

or

...

table

...

cell,

...

the

...

list

...

entry/table

...

row

...

will

...

be

...

copied

...

for

...

each

...

row

...

of

...

data

...

imported

...

into

...

the

...

presentation.

...

Data MarkerOutput
List entry

Image Added

 
Table Row

Image Added

Image Added

Code

Although no additional code beyond calling {{BindData}}

...

is

...

needed,

...

PowerPointWriter

...

will

...

continue

...

to

...

repeat

...

until

...

all

...

of

...

the

...

data

...

in

...

the

...

data

...

source

...

has

...

been

...

imported.

...

There

...

are

...

several

...

ways

...

to

...

prevent

...

data

...

from

...

flowing

...

over

...

the

...

side

...

of

...

your

...

presentation.

...

See

...

[Fitting

...

Data

...

on

...

to

...

Multiple

...

Slides]

...

for

...

more

...

information.

...

Repeating an entire slide

Template Setup

When repeating over an entire slide, the data markers do not need to be located in a list entry or table row.

In the *notes* section of the slide, add {{%%RepeatSlide}}.

...

This

...

is

...

the

...

repeat

...

slide

...

marker

...

and

...

it

...

tells

...

PowerPointWriter

...

that

...

you

...

want

...

to

...

repeat

...

the

...

slide

...

after

...

reaching

...

the

...

maximum

...

number

...

of

...

rows

...

for

...

this

...

particular

...

slide.

...

 

There can be additional text in the notes section, but %%RepeatSlide must be the first string of characters and must be followed immediately by a space. The marker and white space will be removed in the output file.

Image Added

Code

To set the max number of rows to import onto each copy of the slide, set [MaxRowsPerSlide|DataBindingProperties.MaxRowsPerSlide]

...

to

...

1.

...

This

...

will

...

force

...

PowerPointWriter

...

to

...

make

...

a

...

copy

...

of

...

the

...

slide

...

after

...

repeating

...

each

...

row

...

of

...

data.

...

It

...

will

...

continue

...

to

...

make

...

new

...

copies

...

of

...

the

...

slide

...

until

...

all

...

of

...

the

...

data

...

is

...

used.

...

Code Block
languagec#
DataBindingProperties dataProps = ppt.CreateDatabindingProperties(); dataProps.MaxRowsPerSlide = 1; ppt.BindData(getMailMergeData(), "DataSourceName", dataProps);
{code}