Win32.OLE.Enum man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

Win32::OLE::Enum(3)   User Contributed Perl Documentation  Win32::OLE::Enum(3)

NAME
       Win32::OLE::Enum - OLE Automation Collection Objects

SYNOPSIS
	   my $Sheets = $Excel->Workbooks(1)->Worksheets;
	   my $Enum = Win32::OLE::Enum->new($Sheets);
	   my @Sheets = $Enum->All;

	   while (defined(my $Sheet = $Enum->Next)) { ... }

DESCRIPTION
       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.

   Functions/Methods
       Win32::OLE::Enum->new($object)
	       Creates an enumerator for $object, which must be a valid OLE
	       collection object.  Note that correctly implemented collection
	       objects must support the "Count" and "Item" methods, so
	       creating an enumerator is not always necessary.

       $Enum->All()
	       Returns a list of all objects in the collection.	 You have to
	       call $Enum->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);

       $Enum->Clone()
	       Returns a clone of the enumerator maintaining the current
	       position within the collection (if possible).  Note that the
	       "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.

       $Enum->Next( [$count] )
	       Returns the next element of the collection.  In a list context
	       the optional $count argument specifies the number of objects to
	       be returned.  In a scalar context only the last of at most
	       $count retrieved objects is returned.  The default for $count
	       is 1.

       $Enum->Reset()
	       Resets the enumeration sequence to the beginning.  There is no
	       guarantee that the exact same set of objects will be enumerated
	       again (e.g. when enumerating files in a directory).  The
	       methods return value indicates the success of the operation.
	       (Note that the Reset() method seems to be unimplemented in some
	       applications like Excel 7.  Use it in an eval block to avoid
	       dying.)

       $Enum->Skip( [$count] )
	       Skip the next $count elements of the enumeration.  The default
	       for $count is 1.	 The functions returns TRUE if at least $count
	       elements could be skipped.  It returns FALSE if not enough
	       elements were left.

AUTHORS/COPYRIGHT
       This module is part of the Win32::OLE distribution.

perl v5.14.2			  2005-09-17		   Win32::OLE::Enum(3)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net