toFileAsync(path, opts) {
        if (process.browser) throw new Error("Workbook.toFileAsync is not supported in the browser.");
        return this.outputAsync(opts)
            .then(data => new externals.Promise((resolve, reject) => {
                fs.writeFile(path, data, err => {
                    if (err) return reject(err);
                    resolve();
                });
            }));
    }
Write the workbook to file. (Not supported in browsers.)
@param {string} path - The path of the file to write.
@param {{}} [opts] - Options
@param {string} [opts.password] - The password to encrypt the workbook.
@returns {Promise.<undefined>} A promise.