Randomize

Richard Tallent’s occasional blog

Rube Goldberg and Scripting Languages

There’s a really cool diff class hosted by Google here:

http://code.google.com/p/google-diff-match-patch/

I’ve used it on a few web sites where it is necessary to compare versions of the same text.

But now I want to integrate that functionality into Excel 2003. Unfortunately, Excel 2003 only understands VBA, not JavaScript. So, here’s the convoluted path I’m exploring:

– Have my users install ExcelDna (http://www.codeplex.com/exceldna), an open-source Excel add-in that allows execution of .NET code without nasty COM interop coding.

– Compile the Javascript (JScript.NET) or Java (J#) version of DiffMatchPath into an ExcelDna-friendly .NET DLL that I can distribute.

– Add some wrapped UDF code to the VBA add-in I already have on each user’s machine to use ExcelDna to call the compiled code (if needed).

I’m stuck a little at the moment, though… can’t seem to find the J# compiled installed anywhere. All the docs I’ve seen say it should be in C:\Windows\Microsoft.NET{version}\, but I can’t find a “vjc.exe” anywhere in those folders (I have .NET SDK 1.0, 1.1, 2.0, 3.0, and 3.5 installed).

My other option would be to compile the Java version to a .NET DLL, then use Reflector to decompile to VB.NET, then finally downgrade the VB.NET code manually to VBA. That would actually be my preference–slower, but much easier to deploy. But, again, stuck without a J# command-line compiler.


Share

comments powered by Disqus