Example Printing Pivot Tables

Now we can implement the PrintPivotTables feature of the SRXUtils application. A complex Excel workbook may have a large number of pivot tables scattered on various worksheets. A simple utility for printing these pivot tables can be useful. (I have often been asked to write such a utility in my consulting practice.)

Our application displays a dialog box, as shown in Figure 20-45. The list box contains a list of all pivot tables. Each entry includes the pivot table's name, followed by the name of the worksheet. The user can select one or more pivot tables and hit the print button to print these tables.

Figure 20-45. Print pivot tables

Figure 20-45. Print pivot tables

The following are the steps to create the print utility. All the action takes place in the Print.xls workbook, so open this workbook. When the changes are finished, you will need to save Print.xls as Print.utl as well. If Print.utl is loaded, the only way to unload it is to unload the add-in SRXUtils.xla (if it is loaded) and close the workbook SRXUtils.xls (if it is open).

0 0

Post a comment