Page tree

Versions Compared

Key

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

...

  1. Create a template file containing data markers, each with their own column heading (see How to Use Templates). Do not create any of the PivotTables yet. 

    Section
    Column
    width50

    Column
    width50

     

 

...

  1. Copy the data markers row to another location on the worksheet. Replace the original data markers with arbitrary values of the same data type, which we call "dummy data".

    In Excel 2003
    : Use Microsoft Excel's _PivotTable and PivotChart Report Wizard_ to create a PivotTable referencing the range of cells containing the column headings and dummy data.
    In Excel 2007 or above: Use the Ribbon controls (in Excel 2007 and beyond) to create a PivotTable referencing the range of cells containing the column headings and dummy data.
     

...

  1. Specify the initial layout and field formatting for the PivotTable. Place the PivotTable in any worksheet you desire. (See the Excel documentation for more details about creating your PivotTable.)

    In Excel 2003: Before clicking "Finish" in the Wizard, click the "Options" button and make sure that "Refresh on open" is *not checked*. 

    Section
    Column
    width50

    Image Modified

    Column
    width50

     Image Modified



    In Excel 2007 or above: After creating the PivotTable, right-click on the table and select "PivotTable Options". Click on the Data tab and make sure that "Refresh on open"

...

  1. is not checked. 
     

...

  1. In your newly created PivotTable, you will now see the dummy data. *Replace* the dummy data on the data sheet with the original data

...

  1. marker.

...

  1. Repeat steps 2 through 6 for every PivotTable you wish to create. Finish creating your template file and save it as a version which you may edit in the future, for example "template_edit.xls"

...

  1. Now, save another copy of the template file for production, for example "template_production.xls"

...

  1. Set the PivotTable to refresh on open using the following methods

...

  1. ,

    In Excel 2003: Right-click on a PivotTable and select Table Options. *Check* "Refresh on open". Repeat this for every PivotTable in your workbook. You need to enable refreshing in the production copy in order for the newly-loaded data to automatically fill your PivotTables when the ExcelWriter-generated workbook is opened on the client.

    Section
    Column
    width50

    Image Modified

    Column
    width50

     Image Modified

     
    In Excel 2007 or above: Right-click on a PivotTable and select PivotTable Options. Select the "Data" tab and Check "Refresh on open". Repeat this for every PivotTable in your workbook. You need to enable refreshing in the production copy in order for the newly-loaded data to automatically fill your PivotTables when the ExcelWriter-generated workbook is opened on the client.

...

  1. Save and close the production copy of your workbook and place it in the location on your server which will be accessed by your ExcelWriter script. Never open this file in Excel. If you open the production copy of

...

  1.  the template in Excel, the tables will refresh, pulling in the data markers.

...

  1. If you wish to make changes in your template file, open your editable version. Again, do not refresh the tables in the editable version. After your changes are complete, repeat steps 6 through 9 and overwrite the

...

  1. existing production version.