Win32::OLE: Using own classes in an Excel file

J

JuergenM

Hi all,

Having an Excel (2003) file with classes and functions, I would like to control it by Perl (ActivePerl 5.12.4) using Win32::OLE. Running functions works well with $excel->Run("fun..."), so does working on worksheets or other OLE objects, but I don't know how to instantiate (and use) objects of my own classes.

$obj = Variant(VT_DISPATCH, 'clsObject')

returns

x $obj
Win32::OLE::Variant=SCALAR(0x43ba754)
-> 71232916

which is of TYPE 'VT_DISPATCH',but it has nothing to do with class 'clsObject' in the VBAProject of my Excel file and it doesn't know clsObject's methods and attributes.

I didn't find any doc for this task. I would like to migrate my Excel project to a Perl project over time, but I have to do it step wise, because it has >150 classes :) So I have to use existing classes / algorithms.

Any tips?

Juergen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top