use Win32::OLE; # Start Excel and make it visible $xlApp = Win32::OLE->new('Excel.Application'); $xlApp->{Visible} = 1; # Create a new workbook $xlBook = $xlApp->Workbooks->Add; # Our data that we will add to the workbook... $mydata = [["xxx", "xxx", "xxx"]]; # Write all the data at once... $rng = $xlBook->ActiveSheet->Range("A1:C7"); $rng->{Value} = $mydata; # Create a PivotTable for the data... #$tbl = $xlBook->ActiveSheet->PivotTableWizard(1, $rng, "", "MyPivotTable"); # Set pivot fields... #$tbl->AddFields("Category", "Item"); #$tbl->PivotFields("Price")->{Orientation} = 4; # 4=xlDataField # Wait for user input... print "Press to continue..."; $x = ; # Clean up $xlBook->{Saved} = 1; $xlApp->Quit; $xlBook = 0; $xlApp = 0; print "All done.";