Installation

Contents
[ ]

Make sure your machine meets the system requirements before you begin.

This article explains how to install Aspose.Words for Node.js via .NET on your computer.

npm is the easiest way to download and install Aspose.Words for Node.js via .NET APIs. To do this run the following command:

npm add @aspose/words

Once the module is installed, you can use it fom your Node.js code:

const aw = require('@aspose/words');

// Create a Word document.
var doc = new aw.Document();

// Use a DocumentBuilder instance to add content to the file.
var builder = new aw.DocumentBuilder(doc);

// Write a new paragraph to the document.
builder.writeln('This is an example of a Word document created in Node.js');

// Save it as a DOCX file. The output format is automatically determined by the filename extension.
doc.save('OutputWordDocument.docx');