It seems that VBA will continue to exist as the programming front end for MS Office, which is unfortunate. They had announced Python support for Excel a while back and I wish it was better promoted as a viable VBA replacement.
It seems that VBA will continue to exist as the programming front end for MS Office, which is unfortunate. They had announced Python support for Excel a while back and I wish it was better promoted as a viable VBA replacement.
I'd strongly recommend people avoid Python in Excel, it is a Trojan Horse into forcing you to subscribe to access your own spreadsheets.
And now they’re full circle back to mandating the timeshare computing model even though the local CPU has incredible performance.
Maybe they should rename to Centralsoft.
They are trying to push excelscript aka typescript aka office scripts but uptake has been very slow.
That's only a slight exaggeration, if it is an exaggeration at all (there are all kinds of splody things that are managed by VBA scripts that some intern wrote back in 1999, or that can only be modified by Bob, who retired back in 2006).
They already recommend that new projects use their JS-based Office Scripts instead.
Idiomatic PowerShell embraces the pipeline, though. The number of scripts I've seen in the wood which were haphazardly ported from VBScript or C# showed, however, that people don't care about idiomatic.
1. UNIX-compatibility aliases like "ls -> Get-ChildItem" and "cat -> Get-Content" are not defined in PowerShell on Linux or macOS. For a complete list of these, see the PowerShell source code[1] (look for "#if !UNIX").
2. A number of aliases from PowerShell ≤ 5.1 were removed in PowerShell Core (≥ 6.0), including the particularly annoying "curl -> Invoke-WebRequest" (conflicts with curl.exe) and "sc -> Set-Content" (conflicts with sc.exe).
[1] https://github.com/PowerShell/PowerShell/blob/8ea1598964590b...
PowerShell is cross-platform and works und Ljnux and MacOS as well.
And it's extremely good on itself already, because everything are objects, instead of just strings (bash, etc.). And because it's .NET you can seamlessly write anything you like including kernel calls, etc. without ever needing something like a 3rd party package like you would with e.g., Python.
jtm@aristotle:kali ~ $ apt-rdepends -r powershell
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
powershell
Reverse Depends: ibombshell (0~git20201107-0kali2)
Reverse Depends: kali-linux-headless (2024.2.8)
Reverse Depends: offsec-pen300 (2024.2.3)
Reverse Depends: offsec-pwk (2024.2.3)
ibombshell
Reverse Depends: kali-linux-everything (2024.2.8)
kali-linux-everything
kali-linux-headless
Reverse Depends: kali-linux-default (2024.2.8)
Reverse Depends: kali-linux-everything (2024.2.8)
kali-linux-default
Reverse Depends: kali-linux-everything (2024.2.8)
Reverse Depends: kali-linux-large (2024.2.8)
kali-linux-large
Reverse Depends: kali-linux-everything (2024.2.8)
offsec-pen300
offsec-pwkDisclaimer: work for MS, not on PowerShell or WSL.
If you write bash to execute on WSL2, you’re just orchestrating the Linux VM (that runs on Hyper-V and is cleverly integrated into Windows and makes you feel like you have a native bash shell). If you want to automate Windows using bash, you need some runtime that translate all Linux-like calls to the Windows COM interface.
1. Typical WSL2 distros require far more disk space.
2. RAM used by WSL2 may not be immediately freed when your script exits.
3. WSL2 distros don't auto-update, so telling someone to install, e.g., Ubuntu via the Microsoft Store is insufficient to ensure a well-maintained WSL2 instance.
4. WSL2 requires enabling Windows hypervisor support, which can be difficult (KVM) or impossible (non-bare metal EC2 instances) in virtualized Windows instances.
While (1) is probably not a big deal and (2) and (3) have reasonable workarounds, (4), where relevant, tends to be a showstopper.
You mean like AppleScript?
But the existing implementation of Python means that it's not even close to a viable replacement lmao
The language is very quirky. Simple stuff like using variables is not as intuitive as it should be.
Another issue is encapsulation of logic, it is not straightforward at all. This is my second big issue.
Trying to temporarily disable script policies to run a script is not straightforward either.
If you like to work with real objects, use PowerShell...
Powershell is a mature offering that uses standardized (albeit verbose) naming to allow you to infer what a command should be called Verb-Noun (Get/Set/Start/Stop/etc)-(Process/Service/File/etc).
People are welcome to critique Powershell but more often than not they don't state what the problem actually is.