add XLSX summary to the archive

This commit is contained in:
gapato 2026-06-11 15:29:52 +02:00
commit 7e135392a4
3 changed files with 51 additions and 0 deletions

View file

@ -27206,6 +27206,7 @@ function write_zip_denouement(z, o) {
case "binary": oopts.type = "string"; break;
case "string": throw new Error("'string' output type invalid for '" + o.bookType + "' files");
case "buffer":
case "blob":
case "file": oopts.type = ftype; break;
default: throw new Error("Unrecognized type " + o.type);
}
@ -27219,6 +27220,7 @@ function write_zip_denouement(z, o) {
/*jshint -W083 */
if(o.password && typeof encrypt_agile !== 'undefined') return write_cfb_ctr(encrypt_agile(out, o.password), o); // eslint-disable-line no-undef
/*jshint +W083 */
if(o.type === "blob") return out
if(o.type === "file") return write_dl(o.file, out);
return o.type == "string" ? utf8read(out) : out;
}
@ -27345,6 +27347,13 @@ function resolve_book_type(o) {
o.bookType = _BT[o.bookType] || o.bookType;
}
function toXLSXBlob(wb, filename, opts) {
var o = opts||{};
o.type = 'blob';
o.bookType = 'xlsx';
return writeSync(wb, o);
}
function writeFileSync(wb, filename, opts) {
var o = opts||{}; o.type = 'file';
o.file = filename;
@ -28078,6 +28087,7 @@ XLSX.readFile = readFileSync; //readFile
XLSX.readFileSync = readFileSync;
XLSX.write = writeSync;
XLSX.writeFile = writeFileSync;
XLSX.toXLSXBlob = toXLSXBlob;
XLSX.writeFileSync = writeFileSync;
XLSX.writeFileAsync = writeFileAsync;
XLSX.utils = utils;