
Microsoft Bringing HTML5 and JavaScript to Office 15 - jalbertbowden
http://www.readwriteweb.com/hack/2011/08/microsoft-bringing-html5-and-j.php#.TvLxNtJsCZY.hackernews
======
hrabago
I wonder about the JS#/vendor lock in responses here in HN. We're talking
about a _macro language in MS Office_ , where your development and runtime
environment is very well known (MS Office). I don't know how much portability
demands you expect from code you're writing to format your Excel cells.

    
    
      function mergeAndHideGridlines() {
          getRange("H15:I16").merge();
          activeWindow.displayGridlines = false;
      }
    

Sure I can picture someone pasting in code from his/her JS library to reuse in
a macro, but I don't foresee people commonly doing the other way and having
issues because the Excel function that they worked on for several days doesn't
work for webpages.

~~~
Hominem
Right, they are talking about exposing the existing Office API to Javascript.
Not having Office generate Javascript or some abomination.

------
Hominem
Sounds good if it works. Writing plugins, or automating Office through COM is
an exercise in frustration right now. I've had to automate office to do some
ridiculous stuff with word docs by invoking the COM objects half a dozen times
now, and each time I do it pushes me one step closer to learning rails.

~~~
rrreese
Is there any reason you aren't using Open XML rather then COM?
<http://www.microsoft.com/download/en/details.aspx?id=5124>

For files <100MB I found it much nicer to use then interop.

~~~
Hominem
Need to support legacy files. The last (and biggest) was to import word docs
into a commercial typesetting system. We need to keep the barriers for our
clients as low as possible so couldn't require they give us .docx.

------
rbanffy
If that reduces vendor lock-in, I'm for it. But knowing Microsoft since the
Altair BASIC days, I _have_ to wonder what they are trying to accomplish.

~~~
MichaelGG
Why would anyone think this is to avoid lock-in? If you're writing something
to manipulate the Word document model using the Word API, it's unlikely you're
going to be able to retarget that code to some other system. Just like if you
use the Java libraries, it doesn't matter if the language is portable - you're
still going to need Java to run the code against.

What they are trying to accomplish is simple: Keep more people using Office.
JavaScript and HTML seem to be gaining more traction, so it makes perfect
sense Microsoft would want their products accessible for such developers. What
other reason would there be?

~~~
rbanffy
This is obviously not to avoid lock-in. This is Microsoft, remember?

But, if JavaScript becomes the de facto extension language for Office, at
least we have a smaller problem to deal with than with VBScript.

------
philjackson
Why does Office need to be quite so complicated? It it purely to sell upgrades
or are there people out there who look forward to this stuff?

~~~
AndrewDucker
There are lots of business uses to being able to automate documents. Being
able to do so in JS rather than VBA would be a bonus for companies that have a
need to do so, but don't want to train people in a language that's not used
anywhere else.

It might also allow MS to do nifty online things.

~~~
noamsml
Agreed. Having used VBA in Access back in the day, I can attest that JS would
be a godsend.

------
ropman76
I like this idea. One of my first "hacks" in the workplace was using VBA to
make an Excel worksheet automate some processes my co-workers hated.
Incorporating JavaScript and HTML 5 means more programmers can make coworkers
happy with less investment in programming infrastructure and not being able to
use those skills elsewhere outside of spreadsheets.

------
mbq
I remember older versions of Office making HTML; two pages of some cryptic
stuff after exporting Hello World doc...

------
joelthelion
I wonder if it's going to be HTML5/Javascript or H5++/Microsoft JS#
Professional...

