http://www.perlmonks.org?node_id=285128


in reply to Using Win32::OLE and Excel - Tips and Tricks

thanks for this tutorial but I needed to your line
my $Sheet = $Book->Worksheets("Sheet1"); #in this way to make it run my $Sheet = $Book->Worksheets(1);
or I get this error:

Win32::OLE(0.1601) error 0x8002000b: "Indice non valido" in METHOD/PROPERTYGET "Worksheets" at C:\prova\OLEexcel.pl line 20

why ??
thanks 4theTuT Lor*

Replies are listed 'Best First'.
Re: Re: Using Win32::OLE and Excel - Tips and Tricks
by guha (Priest) on Aug 21, 2003 at 13:12 UTC

    Looks to me like you are using an italian?? version of Excel, where I would guess that "Sheet1" is named "Foglio1" or some such.

    Accessing the sheet through index ie "1" in your example works, because you avoid the language differences

    HTH