6 ms·
VBA should be replaced by VB.NET or (Iron)Python.
by kros 14y ago
VBA should be replaced by VB.NET or (Iron)Python.
- karamazov 14y agoWhy would you prefer those to Python? (And to every other language?)
- tbatterii 14y agoa .net based language probably already has hooks into the office API's, that would be one reason to use iron python vs. regular cpython.
- vj44 14y agoThe problem with ironpython is that it's not always compatible with all python libraries (esp. those based on C extensions; ie. heavy, scientific libraries similar to scipy); Using regular CPython immediately solves this problem. Also, the official .Net office API (read: VSTO) is not targeted on newbie programmers (imho).
- tbatterii 14y agoand the problem with CPython is that is wouldn't be compatible with any of the office api's that are likely based on .net technology. so which one do you think would be better for office. I haven't done ms office automation since office 2k7 but that is the way it was heading. edit: oh I see what you are getting at. a new product from a new company created at mit in 2012. https://www.datanitro.com/ https://www.datanitro.com/ I would argue that a $500 license is also not targeted at newbie programmers either. can you run native python from excel without shelling out $500 ?
- vj44 14y agoThat's exactly what DataNitro offers - the entire Excel api in (C)Python. Oh, and it's free for non-commercial use (educational etc.)
- tbatterii 14y agobut none of the office api
- tbatterii 14y agoso datanitro really is the future of excel as described in the blog post. good to know. I'm still curious as to how putting any "real" programming language behind spreadsheets is supposed to fix the situation that happened last week. the blog wasn't very convincing and it feels like it's just giving a poor disciplined group of people a more powerful tool to screw things up with. That's not a future I look forward to.
- FigmentEngine 14y agoyep see https://news.ycombinator.com/item?id=5208950 https://news.ycombinator.com/item?id=5208950
- MichaelGG 14y agoOr F#, so you're already in a more functional environment.
- niggler 14y agoVBA is a surprisingly flexible language (although it does have many quirks) and is visually much cleaner than python. Read the MS-VBAL spec: http://msdn.microsoft.com/en-us/library/dd361851.aspx http://msdn.microsoft.com/en-us/library/dd361851.aspx
- RyanMcGreal 14y ago> and is visually much cleaner than python I must respectfully disagree. Python is required to be visually clean by making indentation part of the syntax.
- niggler 14y agovisual cleanliness is not just about whitespace. There are other considerations like how well the clauses stand out: If x > 0 Then y = 3 Else y = 4 End If is much easier to scan than if x > 0: y = 3 else: y = 4 Even though there are more characters in the vb side, the fact that the blocks are explicitly ended give you a much better mental cue than merely shifting the whitespace indentation
- cturner 14y agoIt's probably subjective. I've always found capitalisation makes scanning harder. VB was one of my early languages, and I recall trying to find a way to turn off VB capitalisation way-back-when when I was developing in it. But it might be odd to me. Whenever I see a directory of C with a CVS directory, I feel a brief tension from all the shouting.
- RyanMcGreal 14y agoI used to program in VB/VBA and switched to Python several years ago. As the other person who replied notes, 'visual cleanliness' is subjective, but I vastly prefer looking at Python to looking at VB/VBA, and I immediately began to prefer it on learning Python, despite having programmed in VB for several years previous. Part of it is that you can communicate the same information with fewer tokens and in less space. My eyes don't have to jump around as much to figure out what's going on.
- protomyth 14y agoGiven the basic programming ability of the folks using Excel, I would expect something more along the lines of BizTalk's orchestration designer or ChipWits. and, yes I have spent the odd moment programming such a thing
- deleted 14y ago[deleted]
- FigmentEngine 14y agoExcel can be extended using .Net for quite a while now... this even allows you to add to the functions within excel. Writing Custom Excel Worksheet Functions in C# http://blogs.msdn.com/b/gabhan_berry/archive/2008/04/07/writing-custom-excel-worksheet-functions-in-c_2d00_sharp.aspx?Redirected=true http://blogs.msdn.com/b/gabhan_berry/archive/2008/04/07/writ... How To Create an Excel Macro by Using Automation from Visual C# .NET http://support.microsoft.com/kb/303872/en-us http://support.microsoft.com/kb/303872/en-us How To Create an Excel Macro by Using Automation from Visual Basic .NET http://support.microsoft.com/kb/303871/EN-US http://support.microsoft.com/kb/303871/EN-US