Creating OpenXML Documents Using JavaScript

I have an application that should create simple OpenXML documents (in particular PowerPoint presentations) using JavaScript.

Can anyone suggest a way to start with this, please (or even if possible)? I used the Microsoft OpenXML SDK to do something similar using C # and wondered if JavaScript libraries exist with similar functionality.

Essentially, the problem is how to create the individual OpenXML documents that make up the unpacked PowerPoint document, and then pin them together to create a PowerPoint file (.pptx), which can then be saved to your disk.

Any ideas are welcome!

+7
source share
3 answers
+4
source

Obviously, operations such as zipping / unZipping a document or saving a document cannot be performed on the client side and with pure javascript.

However, if you want to do such things, I believe that there are Linux packages that take strings as input and give you a ready-to-use Office document as output.

If you are not comfortable with Linux packages, if you want to save this as a Word 2007 document:

<?xml version="1.0" encoding="utf-8"?> <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:body> <w:p> <w:pPr> <w:pStyle w:val="MyHeading1" /> </w:pPr> <w:r> <w:t>This is Heading</w:t> </w:r> </w:p> </w:body> </w:document> 

You can create this line on the client side. then send it to the server via AJAX and let your server handle it. in particular, I have used these APIs several times. let PHP handle this. save the result somewhere or force the client browser to load it (stream results)

0
source

USE OPEN XML SDK . You can run it on node, and after 32 seconds it will create 2000 documents. Or you can run it in a browser.

0
source

All Articles