js-xlsx icon indicating copy to clipboard operation
js-xlsx copied to clipboard

support compression

Open yeshm opened this issue 6 years ago • 2 comments

yeshm avatar Jan 18 '19 07:01 yeshm

Can this acutually work?

Zhenyi-Wang avatar Apr 21 '21 07:04 Zhenyi-Wang

Friend you forgot to add compression: "DEFLATE" in the first four cases..

 switch (o.type) {
            case "base64":
                return z.generate({ type: "base64", compression: "DEFLATE" });
            case "binary":
                return z.generate({ type: "string", compression: "DEFLATE" });
            case "buffer":
                return z.generate({ type: "nodebuffer", compression: "DEFLATE" });
            case "file":
                return _fs.writeFileSync(o.file, z.generate({ type: "nodebuffer", compression: "DEFLATE" }));

Zhenyi-Wang avatar Apr 22 '21 02:04 Zhenyi-Wang