Dear perl gurus and the one who (literally) wrote the information known on 
OLE, Jan Dubois-

The following code snippet seems to be producing an extra worksheet that 
is a duplicate of the 4th sheet, but when i fill in the cells nothing gets 
added after the first line. I am stumped as to what is happening. Do any 
of you have any theories? so far i have tried making books instead only to 
not have the 4th created. i have tried 0-3 instead of 1-4 with similar 
results.

The following OLE libs are used:

use Win32::OLE qw(in with); # use base OLE
use Win32::OLE::Const 'Microsoft Excel'; # use OLE/Excel
   $Win32::OLE::Warn = 3; # die on errors...
use Win32::OLE::Enum;
use Win32::OLE::Variant;

-Josh

[code snippet]
  # we have to create it, including make the first row
  $Excel -> { 'SheetsInNewWorkBook' } = 4;
  my $workbook = $Excel -> Workbooks -> Add();
  my $ws1 = $workbook -> Worksheets(1);
  my $ws2 = $workbook -> Worksheets(2);
  my $ws3 = $workbook -> Worksheets(3);
  my $ws4 = $workbook -> Worksheets(4);
  $ws1 -> { 'Name' } = "General - $date";
  $ws2 -> { 'Name' } = "Hotfixes - $date";
  $ws3 -> { 'Name' } = "Applications - $date";
  $ws4 -> { 'Name' } = "Hardware - $date";
[/code snippet]

-----------------------------------------


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to