home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


GetObject


Win32::OLE->GetObject
(
filename
)

Creates an automation object based on a document. filename is the full pathname of the document, which can be optionally followed by additional item subcomponents separated by exclamation marks ( ! ). For example:

$doc = 'c:\test\test.xls';
$x1 = Win32::OLE->GetObject($doc);
This code creates an Excel instance based on an Excel file. It is not always clear what type of object GetObject will return from a document since applications may register for than one document type (e.g., worksheets, charts, macro files, etc. for Excel). You can use QueryObjectType on an object to get the class name of the object.


Previous: Reference: GetActiveObject Perl in a Nutshell Next: 19. Win32 Modules and Extensions
Reference: GetActiveObject Book Index 19. Win32 Modules and Extensions

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.