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

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,=20

Having an Excel (2003) file with classes and functions, I would like to con=
trol it by Perl (ActivePerl 5.12.4) using Win32::OLE. Running functions wor=
ks 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 ow=
n classes.=20

$obj = Variant(VT_DISPATCH, 'clsObject')


x $obj
   -> 71232916

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

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

Any tips?


Site Timeline