Win32::OLE::Enum - OLE Automation Collection Objects |
Win32::OLE::Enum - OLE Automation Collection Objects
my $Sheets = $Excel->Workbooks(1)->Worksheets; my $Enum = Win32::OLE::Enum->new($Sheets); my @Sheets = $Enum->All;
while (defined(my $Sheet = $Enum->Next)) { ... }
This module provides an interface to OLE collection objects from Perl. It defines an enumerator object closely mirroring the functionality of the IEnumVARIANT interface.
Please note that the Reset()
method is not available in all implementations
of OLE collections (like Excel 7). In that case the Enum object is good
only for a single walk through of the collection.
new($object)
Count
and Item
methods, so creating an enumerator is not always
necessary.
All()
Reset()
before the enumerator can be used again. The previous
position in the collection is lost.
This method can also be called as a class method:
my @list = Win32::OLE::Enum->All($Collection);
Clone()
Clone
method is often not
implemented. Use $Enum->Clone()
in an eval block to avoid dying if you
are not sure that Clone is supported.
Reset()
Reset()
method seems to be unimplemented in some
applications like Excel 7. Use it in an eval block to avoid dying.)
This module is part of the Win32::OLE distribution.
Win32::OLE::Enum - OLE Automation Collection Objects |