作者:豆豆马捷 | 来源:互联网 | 2023-05-18 09:50
ThecompanyIworkatisrunonExcelsheets.SeveralofthosesheetshavesomeformofVBAcodeemb
The company I work at is run on Excel sheets. Several of those sheets have some form of VBA code embedded. I'm doing some maintenance on them, but it feels really dated.
我工作的公司是在Excel工作表上运行的。其中一些工作表嵌入了某种形式的VBA代码。我正在对它们进行一些维护,但感觉真的过时了。
What's going to happen to Office VBA?
Office VBA会发生什么?
Why hasn't Microsoft released an embedded .NET macro language for Office?
为什么Microsoft没有为Office发布嵌入式.NET宏语言?
5 个解决方案
Short answer: you're probably fine for a while yet.
简短的回答:你可能还好一段时间。
Long answer: VB6 (which is what VBA really is) is pretty much a dead, unsupported language, last updated a decade back with an IDE from the same period. It's only still around because it's embedded in Office and there are millions of Office apps that would stop working if VBA was removed or changed. Not to mention millions of mightily annoyed users.
答案很长:VB6(VBA真的是这个)几乎是一种死的,不受支持的语言,最后几年用同一时期的IDE更新了。它仍然存在,因为它嵌入在Office中,如果移除或更改VBA,有数百万的Office应用程序将停止工作。更不用说数以百万计的受害者了。
So how to move forward? Can Office be re-implemented in managed code? Does Microsoft want to do that at all? Are they going to make an even bigger backward-compatibility break than the Ribbon and just discard the notion of macro recording and interpreted embedded code? I just can't see my users taking to VB.NET in Visual Studio, using COM Interop and whatnot.
那么如何前进呢?可以在托管代码中重新实现Office吗?微软是否想要这样做?它们是否会比功能区产生更大的向后兼容性中断,只是放弃了宏录制和解释嵌入代码的概念?我只是看不到我的用户使用COM Interop和诸如此类的东西在Visual Studio中使用VB.NET。
If I had to put money on one outcome (and I wouldn't want to bet much even then) I'd be looking at the Dynamic Language Runtime and the fact that several languages are in various states of preparedness to run on it. Suppose the DLR, with some suitable replacement or wrapper for the Office app COM model, were to replace the VB6 runtime. Further, suppose VBA were implemented as a DLR language. Now legacy VBA will continue to run, just on a different (modern, supported) interpreter and into the bargain, we can program Excel macros in Python, Ruby or whatever other DLR language takes our fancy.
如果我不得不把钱投入到一个结果上(我甚至不想多打赌)我会关注动态语言运行时以及几种语言在各种准备状态下运行的事实。假设使用Office app COM模型的一些合适的替换或包装器的DLR将替换VB6运行时。此外,假设VBA是作为DLR语言实现的。现在传统的VBA将继续运行,只是在一个不同的(现代的,支持的)解释器和讨价还价,我们可以用Python,Ruby或任何其他DLR语言编程Excel宏。
But that's just my best guess - I have no idea whether or not it's anywhere near to waht will actually happen. I'd surely love to be able to program Excel macros in Ruby, though.
但这只是我最好的猜测 - 我不知道它是否真的会发生。不过,我当然希望能够在Ruby中编写Excel宏。