(on my CV!)
I deployed my first commercial VSTO add-in last week. (I have done loads of meddling over the years of course, especially in the early versions)
As per my previous advice I use VS2008 and it was targeting Excel 2007.
It was a rewrite of a VBA add-in, I chose VSTO, mainly because it needed to listen for Excel events and this is notoriously flaky in VBA.
I have always said I like the idea of VSTO and the technology. My biggest gripe has always been deployment, and the significant list of prerequisites.
As this was a homogeneous corporate environment which met the prereqs, there weren’t really any downsides.
Given the choice between working in Visual Studio or working in the VBAIDE (whose own mother even, wouldn’t love it) I would always choose VS. Given the choice between a C language and a BASIC language I would always choose the C one.
So with no obvious downside (apart from fighting C# into working with a COM OM of course), and the joy of VS2008 and C# it was a no brainer.
So here is the scoop:
Events in VSTO are easier than VBA because you don’t need to faff around with a class wrapper. I spose you could just use the thisworkbook module in VBA, but I think thats a bit misleading.
Because VS2008 has mega intellisense you only have to type the first couple of letters and you are away.
C#/Excel is a bit more painful than VBA, but the VSTO guys have the ‘VSTO Power toys’ (google it)(or bing it) which eases then pain. For example styles(x) in VBA has to be Styles.item(x) in C# (can’t exactly remember which collection it was, but it took me ages to work out what the compiler was complaining about). As I understand it the power toys are an unsupported version of some of whats coming in 2010, the biggie being that you can call lots of Excel methods without loads of object.missings.
C# has some nice language features which if you can use make up for the OM niggles.
And finally deployment is a veritable piece of pish. Publish and forget. And with ClickOnce the add-in phones home at an interval you decide to check for updates, if it finds them it silently installs them. There is no, repeat NO security faffing required any more, what a relief.
This was my first brush with VSTO since version 1 using VS2003? I think, and Office 2003. At that stage I think I declared it unfit for use and abandoned it. As did many others in fact.
It’s hard to put into words just how far it has come since then, I’m still not convinced for Codematic web stuff that is offered to everyone and anyone but for corporate developments I think VSTO is the way to go, and the sooner the better. The alternative to join .net and Excel is a shimmed COM add-in which I wouldn’t really call a clean solution.
A quick scoot on Jobserve suggests Excel/VBA/C# is a pretty strong skillset right now, and I think it will get stronger and stronger. I am starting to see specific requests for VSTO and ClickOnce too.
I’ll do another post about the dynamics of the jobmarket because I think there are some big changes afoot.
Are you using VSTO? If not, are you planning to? and when? C# or VB?
cheers
Simon
