Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

OLE IDispatch access with Perl

by Corion (Pope)
on Jun 06, 2000 at 17:36 UTC ( #16602=note: print w/ replies, xml ) Need Help??

in reply to Stranger in a Strange land

I haven't done it myself, but the Win32::Ole documentation looks quite simple (simple of course, if you know the Excel "object model")...

The MSDN has some documentation on the Excel object model, as has the Office Development Kit, something you might want to buy if you do Office development on a regular basis...

Some code from the top of my head - I haven't done Excel automation for a looong time ... Note that you can take the method and object names from any VB code, as both Perl and VB call through the IDispatch methods of Excel.

$ex = Win32::OLE->new('Excel.Application') or die "oops\n"; $ex->Worksheets(0)->Cells(0,0) = "Hello world";

I'm not sure about the parameters you have to pass to the Cells function - some VB sample code should be easy to port though.

Comment on OLE IDispatch access with Perl
Download Code
Replies are listed 'Best First'.
RE: OLE IDispatch access with Perl
by Jonathan (Curate) on Jun 06, 2000 at 18:39 UTC
    Thanks for that,

    Simple things do appear fairly straight forward, guess I'll have to bite the bullet and take on the Excel object model.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://16602]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2016-05-07 00:09 GMT
Find Nodes?
    Voting Booth?