in reply to Adding Excel sheet

There are lots of nodes here at PerlMonks with sample code for Excel Automation. Use the search bar as a starting point. The code that allows you to copy sheets (from running a macro in Excel and looking at the macro code) is:
#!/usr/bin/perl -w use strict; use Win32::OLE; my $excel = Win32::OLE->new('Excel.Application'); $excel->{'Visible'} = 1; my $Book = $excel->Workbooks->Open("c:\\temp\\foo.xls"); my $Sheets = $Book->Sheets; my $sheet1 = $Sheets->Item(1); # Sheets("Sheet1").Copy Before:=Sheets(1) # Sheets("Sheet1 (2)").Select $Sheets->{"Sheet1"}->Copy($sheet1); 1;

Celebrate Intellectual Diversity