msoc
v0.2.0
Published
decrypt or encrypt microsoft office files with password
Downloads
2
Maintainers
Readme
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);