New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

msoconvert

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msoconvert

Convert Word and Excel documents (Windows only)

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
1
-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

msoconvert

Convert Word and Excel documents in Node.js (for Windows only). This is a wrapper around DocTo.

Microsoft Word/Excel must be installed on the system.

Installation

npm install msoconvert --save

Usage

const convert = require("msoconvert");

// All the folling options are strings:
convert({ 
  input, // Input file or directory path.
  output, // Output file or directory path.

  // The two following only apply if input is a directory:
  inputExt, // Extension to search for if directory.
  outputExt, // Output extension.

  // Recommended:
  encoding, // Output encoding (see below).

  // Additional options:
  use, // "word" (default) | "excel" | "powerpoint"
  format, // wdSaveFormat for output (see below).
  options // Additional arguments passed to docto.exe. Refer to DocTo documentation.
})
  // A promise is returned.
  .then(() => console.log("done"));

See DocTo documentation for more information about API and additional parameters.

encoding

Available encodings can be found in enums/msoencodings.json. It is possible to avoid the msoencoding prefix.

If encoding is not defined, msoconvert will use the default encoding defined in MS Office application settings. It is recommended to always define an encoding.

format

wdSaveFormat enums:

If format is not defined, msoconvert will try to guess the format from outputExt if provided (otherwise an error will be thrown).

Keywords

convert

FAQs

Package last updated on 01 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts