use Spreadsheet::WriteExcel; use File::Copy; # Create a new Excel workbook my $workbook = Spreadsheet::WriteExcel->new('perl.xls'); # Add a worksheet my $worksheet = $workbook->add_worksheet(); # Write a formatted and unformatted string, row and column notation. $col = $row = 0; $worksheet->write($row, $col, 'Hi Excel!', $format); undef $worksheet; undef $workbook; copy("perl.xls","perl2.xls") or die "Copy failed: $!";