{"id":2918,"date":"2016-03-19T06:01:36","date_gmt":"2016-03-19T06:01:36","guid":{"rendered":"http:\/\/www.ericwhite.com\/home2\/bm8qcmjy\/public_html\/blog\/?page_id=2918"},"modified":"2016-03-19T06:48:22","modified_gmt":"2016-03-19T06:48:22","slug":"working-with-open-xml-documents-using-javascript","status":"publish","type":"page","link":"https:\/\/www.ericwhite.com\/blog\/working-with-open-xml-documents-using-javascript\/","title":{"rendered":"Working with Open XML Documents using JavaScript"},"content":{"rendered":"<p><span class=\"Back\"><a class=\"Back\" href=\"https:\/\/www.ericwhite.com\/blog\/open-xml-and-javascript\/\">Return to the<br \/>Open XML and JavaScript<br \/>Developer Center<\/a><\/span><\/p>\n<p>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. \u00a0Your application could automatically generate a word-processing document or a spreadsheet based on user interactions in your application. \u00a0While it certainly is straightforward to implement Open XML functionality server-side, when the application mainly is running client-side, it doesn\u2019t make sense to require an interaction with the server to do document generation or modification.<\/p>\n<p>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.<\/p>\n<p>In addition, server-side JavaScript is now becoming much more common. \u00a0Being 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.<\/p>\n<p>The following screen-cast demonstrates two proof-of-concept examples:<\/p>\n<ul>\n<li>The first example enables the end-user to load an Open XML application into<br \/>\nclient-side JavaScript data, modify the document, and then save that document<br \/>\nback to the local hard drive.<\/li>\n<li>The second example shows how to generate an Open XML application based on user<br \/>\ninput in the web application.<\/li>\n<\/ul>\n<p>The code is attached to this blog post.<\/p>\n<p><iframe loading=\"lazy\" title=\"JavaScriptOpenXmlPOC\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/9p59cR1LmiU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>There is an <a href=\"https:\/\/www.ericwhite.com\/blog\/open-xml-and-javascript\/\">Open XML \/ JavaScript Resource Center<\/a>, where you can find all of the content that we have put together on using Open XML from JavaScript.<\/p>\n<p>This screen-cast refers to two external links:<\/p>\n<p>Adobe Flex SDK: <a href=\"http:\/\/www.adobe.com\/devnet\/flex\/flex-sdk-download.html\" class=\"broken_link\">http:\/\/www.adobe.com\/devnet\/flex\/flex-sdk-download.html<\/a><\/p>\n<p>JSZip: <a href=\"http:\/\/stuartk.com\/jszip\/\">http:\/\/stuartk.com\/jszip\/<\/a><\/p>\n<p>Download &#8211; <a href=\"https:\/\/www.ericwhite.com\/blog\/wp-content\/uploads\/2016\/03\/JavaScriptOpenXmlPoc.zip\">Example Code<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Return to theOpen XML and JavaScriptDeveloper 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. \u00a0Your application could automatically generate a word-processing document or a spreadsheet based on user interactions in your application. \u00a0While [&hellip;]<\/p>\n","protected":false},"author":10567,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_s2mail":"","footnotes":""},"class_list":["post-2918","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/users\/10567"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/comments?post=2918"}],"version-history":[{"count":6,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2918\/revisions"}],"predecessor-version":[{"id":2937,"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/pages\/2918\/revisions\/2937"}],"wp:attachment":[{"href":"https:\/\/www.ericwhite.com\/blog\/wp-json\/wp\/v2\/media?parent=2918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}