Message-ID: <577278837.10277.1711719915461.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10276_1395956216.1711719915461" ------=_Part_10276_1395956216.1711719915461 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html ExcelTemplate Guides

ExcelTemplate Guides

How to Use Templates=

=20

An ExcelWriter template is an Excel spreadsheet that contains = ExcelWriter data markers. A data marker is a cell value beginning with=  %%=3D or %%=3D$ that specifies a database column, vari= able, or array to insert in the spreadsheet column. A data marker may inclu= de modifiers.

=20

Creating Data Markers

=20

A data marker is a cell value or sheet tab name beginning with=  %%=3D or %%=3D$ that specifies a database column, a va= riable, or an array to insert in the spreadsheet column or sheet tab contai= ning the marker. Data markers are created in Microsoft Excel and bound to d= ata sources in code. When you run the code, ExcelWriter populates the data = markers with values from a data source.

=20

Stretching Formulas=20

A data marker is a single cell value, but a data marker will usually be = populated with several rows of cell values. For example, if you set the dat= a source for the data marker %%=3DProducts.ProductID, to the "ProductI= D" column in a database table, the marker cell and the cells below it = will be populated with ProductID values. New rows will be inserted between = the data marker row and the next row in the template that contains a value.= This can affect formulas because the range of cell values a form

=20

Using Charts = with ExcelTemplate

=20

When you include a chart in a template spreadsheet, you can use a data m= arker column as a data source for the chart. Excel will automatically adjus= t charts to include the number of rows that ExcelWriter assigns to the data= marker column.

=20

Drawing Obje= cts and Data Markers

=20

If you include drawing objects (charts, comments, etc.) in a template, E= xcelWriter will preserve the objects in the generated workbook. However, de= pending on where the object is in the template, ExcelWriter may move or mod= ify it.

=20

Using an Arra= y as a Data Source

=20

The following sample generates an Excel spreadsheet from a template usin= g arrays as data sources.

=20

Using a Dat= abase as a Data Source

=20

The sample above generates a spreadsheet from the template using ADO.NET= objects as the data source.

=20

Using Grouping and Nesting with ExcelTemplate

=20

Starting in version 7.1 of ExcelWriter, you can use [grouping and nestin= g markers|Creating Data Markers#grouping] to display flat data in a grouped= and nested format using the ExcelTemplate object.

=20

Templates and Pivot= Tables

=20

A PivotTable report is an interactive table which allows the user to hav= e multiple views of data. By changing the view, the PivotTable report can s= how different summaries of the data or drill down to display more details f= or particular areas. ExcelWriter allows you to include PivotTables in an Ex= celWriter template file. If there are PivotTables in the original= template file, they will be preserved when the template is processed using= ExcelWriter.

=20

ExcelTemplate Ou= tput Options

=20

ExcelTemplate has several different options for saving an ExcelTemplate = generated file.

=20

------=_Part_10276_1395956216.1711719915461--