Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: New to Perl - is it a better language than VB for this application?

by davies (Vicar)
on Mar 20, 2013 at 08:22 UTC ( #1024474=note: print w/ replies, xml ) Need Help??


in reply to New to Perl - is it a better language than VB for this application?

What features of Perl are you planning to use that aren't available in VBA? If there aren't any, stick to VBA. It's a ghastly language, but it's more readable to the beginner than Perl and the interface to Excel is slightly cleaner (see my reply to Extracting Chinese characters from Excel for a situation where VBA can but Perl can't). Remember that if you are trying to recruit someone to maintain the code, they will have to know Excel and $language. That group is much larger (or at least thinks it is) for $language = VBA than for $language = Perl.

But yes, there are plenty of situations where Perl has the edge. That's why I'm here! And there are at least tens of thousands of accountants (my field) who think that recording a macro is programming and end up producing screeds of inefficient code that is utter rubbish and totally unmaintainable. Look out for telltale signs such as Select and Activate. If you don't know why that's bad, read Excel’s Select and Activate considered harmful.

One inefficiency I can warn you about in either language: passing data into and out of Excel is hideously slow. If you can, read and write blocks with single statements by passing arrays (I don't think I've demonstrated this in any of my code here, but it's a common technique). Certainly minimise your transfers and don't use Excel cells as variables.

Regards,

John Davies


Comment on Re: New to Perl - is it a better language than VB for this application?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2014-09-20 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls