in reply to RE: (Guildenstern) Re: Win32::OLE and Excel
in thread Win32::OLE and Excel
and it worked perfectly. (Notice the braces around the two sections.) Putting the sections in blocks like that forces DESTROY to be called before the next new is called.use Excel; { my $s = Excel->new("here.xls"); $s->print("one", "Hello World\nThis\tis\ta\ttest\n"); $s->print("one", join("\t", 1 ..10)); $s->print("one", "bye\n"); $s->print("one", join("\n",3 .. 5) . scalar(localtime)); $s->print("two", join("\n",13 .. 25) . scalar(localtime)); $s->print("eight", join("\n",13 .. 20) . scalar(localtime)); } { my $t = Excel->new("c:/temp/there.xls"); $t->print("two", join("\n",13 .. 25) . scalar(localtime)); }
|
|---|