The instructions on this page apply for using pivot tables with ExcelWriter 7.6 and above. If you are using ExcelWriter 7.5 or earlier please use the instructions on Templates and Pivot Tables in Older Versions |
A pivot table report is an interactive table which allows the user to have multiple views of data. By changing the view, the pivot table report can show different summaries of the data or drill down to display more details for particular areas. ExcelWriter allows you to include pivot tables in an ExcelWriter template file. If there are pivot tables in the original template file, they will be preserved when the template is processed using ExcelWriter.
When using the ExcelApplication object to modify an existing spreadsheet, the following steps are not required; these steps are necessary only when opening a file containing data markers (i.e. an ExcelWriter template). |
An ExcelWriter template is a file created in Microsoft Excel that contains data markers. A data marker is a cell value beginning with %%= or %%=$ that specifies a database column, variable, or array to insert in the spreadsheet cell or column containing the marker. ExcelWriter gets values at runtime from a data source and imports them to spreadsheet data markers.
For detailed information on data markers, see Creating Data Markers.
ExcelTemplate data markers can be used to bind data to a template for use with a Pivot Table. When ExcelTemplate binds the data to the data markers, it also updates the range that the pivot table uses as a pivot table cache. By setting the pivot tables to refresh on opening, they will automatically bring in the new values from the pivot table cache.