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

Re^4: Creating Excel Macros from Perl

by Anonymous Monk
on Jan 08, 2014 at 12:38 UTC ( #1069784=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Creating Excel Macros from Perl
in thread Creating Excel Macros from Perl

adding the Sub to Codemodule and calling it from perl worked fine {with below code}. How do I call this Sub again from Excel, when i open vb editor I did not see any module with the Sub created from perl. Please help!

my $code = <<'END_CODE'; Sub dosomething(say As String) For Each cell In ActiveSheet.Range("A1:A10") cell.Value = say Next cell End Sub END_CODE my $codemodule = $mod->Codemodule; $codemodule->AddFromString($code); $xlApp->Run( 'dosomething', 'test...' );


Comment on Re^4: Creating Excel Macros from Perl
Download Code
Re^5: Creating Excel Macros from Perl
by Corion (Pope) on Jan 08, 2014 at 12:41 UTC

    Did you save the Excel sheet?

    Maybe the VB editor does not update its view on the defined subroutines and modules and needs to close and reopen the file to see the changes.

      yes, tried reopening. Did not work

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-10-25 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls