Working with Open XML Documents using JavaScript
Return to the
Open XML and JavaScript
Developer Center
It is becoming more and more common for developers to write rich client-side applications using AJAX, and these applications often want to implement some form of Open XML functionality. Your application could automatically generate a word-processing document or a spreadsheet based on user interactions in your application. While it certainly is straightforward to implement Open XML functionality server-side, when the application mainly is running client-side, it doesn’t make sense to require an interaction with the server to do document generation or modification.
Further, now that we can write Windows 8 Metro-Style applications using HTML5 and JavaScript, we very well may want to include interesting functionality in those applications.
In addition, server-side JavaScript is now becoming much more common. Being able to work with Open XML documents in JavaScript means that we do not need to build a hybrid application that uses C# or Java to do the document manipulation, and then use some form of interop technique so that the server-side JavaScript can deliver the application to the user.
The following screen-cast demonstrates two proof-of-concept examples:
- The first example enables the end-user to load an Open XML application into
client-side JavaScript data, modify the document, and then save that document
back to the local hard drive. - The second example shows how to generate an Open XML application based on user
input in the web application.
The code is attached to this blog post.
There is an Open XML / JavaScript Resource Center, where you can find all of the content that we have put together on using Open XML from JavaScript.
This screen-cast refers to two external links:
Adobe Flex SDK: http://www.adobe.com/devnet/flex/flex-sdk-download.html
JSZip: http://stuartk.com/jszip/
Download – Example Code