2017-07-08 21:37:02 +01:00
2016-05-23 22:23:05 +01:00
2017-04-16 01:07:11 +01:00
2017-04-16 00:04:29 +01:00
2017-04-16 12:22:50 +01:00
2017-04-17 16:36:56 +01:00
2016-03-26 23:43:57 +00:00
2017-07-08 21:37:02 +01:00
2017-04-17 19:53:53 +01:00

clippy the assistant

Generate .docx files with JS/TS very easily, written in TS.


NPM version Build Status Dependency Status Known Vulnerabilities Chat on Gitter

NPM

docx

Install

$ npm install --save docx

Demo

$ npm run demo

will run the demo selector app in the demo folder. It will prompt you to select a demo number, which will run a demo from that folder.

Guide

Please refer to the Wiki for details on how to use this library, examples and much more!

Full documentation can be found here: http://dolanmiu.github.io/docx

Simple Usage

// Used to create docx files
var docx = require('docx');

// Create document
var doc = new docx.Document();

// Add some content in the document
var paragraph = new docx.Paragraph("Some cool text here.");
// Add more text into the paragraph if you wish
paragraph.addRun(new docx.TextRun('Lorem Ipsum Foo Bar'));
doc.addParagraph(paragraph);

// Used to export the file into a .docx file
var exporter = new docx.LocalPacker(doc);

// Or use the express packer to make the file downloadable.
// res is express' Response object
var exporter = new docx.ExpressPacker(doc, res);

exporter.pack('My First Document');

// done! A file called 'My First Document.docx'
// will be in your file system if you used LocalPacker
// Or it will start downloading if you are using Express

Examples

Check the Wiki for examples.


Made with 💖

Huge thanks to @felipeochoa for awesome contributions to this project

Description
Languages
TypeScript 100%