RE: Win32::OLE and creation of pivot table in Excel

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

currently only one sheet gah

my $tbl = $workbook->PivotTableWizard( {
     SourceType => 1,
     SourceData => 'gah!R1C1:R2C3',
     TableDestination => "",
     TableName => "PivotTable1",
     HasAutoFormat => 1
currently only two sheets sheet2 and gah
$tbl->PivotFields( 'name of field' )->( { Orientation => 1 } );

no need to switch sheets unless you wish to do something to the sheet besides the pivot table.
$Sheet = $workbook->Worksheets( ++$pivot_sheet_cnt );
$Sheet-> = "_pivot";
to go to the next sheet you would need to do  
$Sheet = $workbook->Worksheets( $pivot_sheet_cnt + $sheet_cnt);

Site Timeline