Tag: VB.Net

The MIE Podcasts – Govert van Drimmelen

In this podcast we caught up with Excel DNA author Govert van Drimmelen. Govert is a Mathematics lecturer at the University of Johannesburg, in South Africa. Excel DNA has had some attention from the Excel blog sphere in the past few months, Simon, Mike, and Mathias have all posted about it. I’ve been using it for a while now, and it’s brilliant. Here we talked about how Excel DNA came about, the basics of how it works, some of the new features and what’s planned for the further.

Govert van Drimmelen, famous for his Tom Selleck impression

If you don’t know what Excel DNA is, well then listen to the podcast, but in short it’s a free and easy way to get .Net code into Excel.

I’m sure you will all join with me in thanking Govert, not only for making time for the podcast, but also for all the hard work he’s done  in getting Excel DNA out of the door – well done Govert!!!

And remember if you’d like to see more of Excel DNA, I’m giving a talk about it at the UK Excel Dev Con, in a weeks time!!!

.Net 4.0 imporvments, Good for Office Devlopers!

I’ve bogged before about version 4.0 of .Net and what it could mean for Office devs. Here’s one other improvement I didn’t know about:

Improvements to Interop Marshaling in V4: IL Stubs Everywhere

The article sums it up thus:

· Faster interop marshaling: the more complex the signature the greater the speed-up

· x86 and x64 behavior matches: we’ve updated the x64 marshaling to behave exactly as x86 always has and mostly without impact to x64

· Better debugging: when something goes wrong in marshaling we now give you the ability, and specialized tools, to find the problem

There’s actual another important effect of the IL Stubs, and that is that the PIA is version independent. In fact the CRL will create it dynamical at run time. So now you can target all version of Office from one 4.0 addin – cool.

I’ll wait a see what the performance increase in like from 3.5 – that sounds like a post in its self!

Excel Podcasts, exciting times!

I'm pleased to announce a new feature here on Methods In Excel - Podcasts.

In the first podcast, I caught up with Simon Murphy of  Codematic and Smurf on Spreadsheets for a chat about professional spread sheet development, it was great to catch up with Simon and probe him for his thoughts! Enjoy.

Listen here, or download from the link.

[podcast]http://www.methodsinexcel.co.uk/Downloads/Podcasts/20091109%20Simon%20Murphy%20On%20Professional%20Excel%20Development%20.mp3[/podcast]

Please leave some comments with any feedback about this podcast, and also any ideas for future podcasts.

Learning Excel and .Net

Jayson (of Excel Ninja) asked about useful resources for folks wanting to develop Excel with languages other than VBA. I’ll limit this list to .Net stuff, VSTO and everything else!

Here are some good links to get you started!

XL Dennis: His blog, his knowledge base and an excellent set of articles on managed com addins, 1,2,3,4,5,6,7,8,9,10

This blog: VSTO and .Net categorises (these need consolidating into one)

Forums: xtream vb talk has a really good Office.Net section and there is the support formu for PED here

Blogs From MS People: Andrew Whitechapel (tec genius) , Kathleen McGrath (instructional godess), Eric Carter (Office Dev Legend).

Books: Professional Excel Development, VSTO for mearl Mortal, Microsoft.NET Development for Microsoft Office, Visual Studio Tools for Office

Tools: VSTO Power Tools, and one of many C# to VB converters

Anyone else have any gems hidden away?

A Devlopers Tool of Choice?

When we talk about which language to use we often, if not always get talking about the technical advantages of a given tool, XLL’s are faster than VBA, VBA is easier to deploy than VSTO, VSTO is more secure than VBA, and so on and so on. Simon has some information here and I have some .Net stuff here. But one aspect that’s over looked is what each offers the developer.

Let’s consider an example. I’m writing a adding for the users in my department, it needs to contain some UDF’s, apply a custom formatting option to a selected range, help import a strangely formatted XML file, and link to a database and pull back some data. What are you going to write that in?

Well from a technical point of view you might like to used an XLL for the UDF’s, a Com adding for the formatting and database stuff and make use of some .Net classes for the XML processing. Nice!

For 90 percent of us, we will solve every problem using VBA, simply because that’s the only tool we have. But what if?

Here’s what I think different technologies offer the developer, not the technological advantage, it the things that make the developer’s live more enjoyable!

VBA: For simple stuff it’s quickest. As things get more complex and or the difficulty of what you are trying to do gets harder VBA becomes more of an effort (think of userform stuff, VBA, vs .Net?!). If you need something that needs constant changes, or something that you expect to grow in size over a period of time it might be worth doing it VBA.

VB6 (Com addins): If the UI you need is a bit more complex, than it might be time to switch to VB6, the more powerful forms and use of active X components means that you can have more choice when designing them. Also from a deployment POV, you have to worry less about the thing being installed on the PC, as you can compile them into the DLL

As the size and complexity of the project increases, switching to VB6 can be a help. Functionality can be complied in to different parts, external libraries can be used and packaged easily, source code can be shared with other developers – although this is rare for Excel projects.

Another good reason for a developer to pick VB6 com adding over VBA ones is that, although generally VB6 code can be changed with little effort to run in VBA, there are times when VBA does not quite have the same feature set, and dropping some code straight in to a VB6 com addin is just easier than messing around trying to convert it to VBA.

VSTO: Well its IDE isn’t 100 years old, thats a big plus! But the most compelling reason why an Excel dev would want to use VSTO, would be to make use of the framework. Forms are incredibly powerful in .Net (form namespace), but so too is all the functionality that the framework provided, like the threading name space, or the services name space. When we start to try and do really grand stuff, .Net is brilliant.

C/C++ [XLL]: Purely from an easy of development POV, I can only really think of 2 things XLL would over. One would be a situation where you need to deploy is a “hostile” environment, so the extra work in the coding would be repaid in the effort saved deploying. The other would be if there is a C library with some complex functions in it, a bit like with the VB/VBA issue, it might just be easier to keep the C code and wrap it up in a XLL.

VSTA: What's VSTA?!?!

So there you go that’s my take on it, disagree?