msoc

0.2.0 • Public • Published

msoc

encrypt and decrypt ms office file using password, for Linux only

installation

Make sure to have git and make installed. The installation process will build shared library from https://github.com/herumi/msoffice. This package only binds built library into nodejs

usages

Decryption

const msoc = require('msoc');

const errno = msoc.input('/path/to/input_file.xlsx')
	.output('/path/to/output_file.xlsx')
	.password('password')
	.decrypt();

Encryption

const msoc = require('msoc');

const errno = msoc.input('/path/to/input_file.xlsx')
	.output('/path/to/output_file.xlsx')
	.password('password')
	.encrypt();

from the codes above, errno will contain error code returned from the process. To get error message, you can use

const errMsg = msoc.getErrorMessage(errno);
console.log(errMsg);

Package Sidebar

Install

npm i msoc

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

24.7 kB

Total Files

7

Last publish

Collaborators

  • blogo3x