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

Discussion in 'Perl Misc' started by JuergenM, Apr 17, 2012.

  1. JuergenM

    JuergenM Guest

    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
     
    JuergenM, Apr 17, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lance Hoffmeyer
    Replies:
    0
    Views:
    241
    Lance Hoffmeyer
    Nov 17, 2003
  2. Replies:
    1
    Views:
    831
  3. aminnis
    Replies:
    1
    Views:
    141
    Brian Helterline
    Sep 16, 2004
  4. Replies:
    5
    Views:
    171
    Ben Morrow
    May 16, 2006
  5. pdfella
    Replies:
    1
    Views:
    170
    Brian Helterline
    Dec 14, 2006
Loading...

Share This Page