5 ms·
I thought this was going to be about python INSIDE Excel. If MS ditched VBA for python, that would be incredible. VBA needs to honestly die cause it is just a h
by MeinBlutIstBlau 5y ago
I thought this was going to be about python INSIDE Excel. If MS ditched VBA for python, that would be incredible. VBA needs to honestly die cause it is just a horrible syntax to read. It's like staring at a SQL Procedure.
- dragonwriter 5y ago> I thought this was going to be about python INSIDE Excel. Yes, xlwings (one of the packagess covered by the book, and the one on whose site the page is hosted) absolutely allows this via an Excel add-in: https://docs.xlwings.org/en/stable/addin.html https://docs.xlwings.org/en/stable/addin.html
- MeinBlutIstBlau 5y agoUnfortunately for all the corporate jobs I've worked at, even getting an add-on for notepad++ has more red tape than a FOIA request...
- dmz73 5y agoPython is a nicer language to use than C or C++ but that is not a very high bar to pass. The main reason VBA is horrible is because it allows dynamic typing by default and Python would not help there at all. VB syntax is actually nicer than Python syntax in at least 3 aspects: 1) VB is not case sensitive 2) VB allows specifying data types 3) VB uses If Then Else End If style syntax that makes it clear where things start and stop. If Excel actually had the SQL based query interface inside the spreadsheet, it would make most of VBA unnecessary and probably improve the performance of Excel macros by several orders of magnitude.
- dragonwriter 5y ago> VB syntax is actually nicer than Python syntax in at least 3 aspects: 1) VB is not case sensitive VB is not case sensitive, but case insensitivity isn't nice; it reduces clarity and forces circumlocution in cases where having case distinctions would not. > 2) VB allows specifying data types Python allows specifying data types, and the major python typecheckers support a more robust type system than VBA. > 3) VB uses If Then Else End If style syntax that makes it clear where things start and stop Python uses indentation-based syntax that makes it more immediately visually clear where things start and stop with less visible noise.
- Hublium 5y agoI'm not quite sure what my opinion on case sensitivity should be in general, but I feel like it's actually dangerous in dynamically typed languages.
- IshKebab 5y agoI don't know - C++ has a sane static type system, value semantics and isn't ridiculously slow. Also case insensitivity is a terrible idea. Everywhere it is used it causes problems.
- omnicognate 5y agoOn Error Resume Next
- ptx 5y agoCase insensitivity might be fine on a language level, but the mandatory IDE makes it annoying. It tries to normalize the case of identifiers, which would be a nice feature except for the fact that it doesn't know about scopes and can't tell variables from properties. The result is that if you declare a variable named "count" anywhere in your project, every property (and every unrelated variable) everywhere gets renamed from "Count" to "count". Makes for annoying diffs.
- pjmlp 5y agoYou can use lambda, JavaScript, any .NET language, any language that knows COM. Those that only use VBA only have themselves to blame.
- andrewlgood 5y agoBack to permissions. Most office workers are not authorized to use those tools. They need the capability built into Excel.
- pjmlp 5y agoWhile I agree permissions are an issue: - lambda and JavaScript, out of the box in latest versions - any .NET or COM aware language, PowerShell fits the bill, there is even a mini-IDE installed by default
- andrewlgood 5y agoThank for the clarification. I did see the lambda announcement, but have not looked at it yet. Will move that up the priority list.
- pjmlp 5y agoWhile you are at it, have a look at Power Query as well, https://docs.microsoft.com/en-us/powerquery-m/ https://docs.microsoft.com/en-us/powerquery-m/
- MeinBlutIstBlau 5y ago>out of the box in latest versions Not every company uses the latest versions of everything. We finally switched everyone to Windows 10 this year. We were paying for Windows 7 support while making the transition.
- deleted 5y ago[deleted]
- occamrazor 5y ago