We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unzip xlsx should use buffer instead of string , or there will be error when unzip large chinese xlsx
function extractFiles(path, sheet) { ... .on('entry', function (entry) { var file = files[entry.path]; if (file) { //let contents = ''; let buffer = new Buffer(""); filePromises.push(new Promise((resolve) => { entry //.on('data', data => contents += data.toString()) .on('data', (data) => { buffer = Buffer.concat([buffer,data]) }) .on('end', () => { //files[file].contents = contents; files[file].contents = buffer.toString(); resolve(); }); })); } else { entry.autodrain(); } }); ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Unzip xlsx should use buffer instead of string , or there will be error when unzip large chinese xlsx
function extractFiles(path, sheet) {
...
.on('entry', function (entry) {
var file = files[entry.path];
if (file) {
//let contents = '';
let buffer = new Buffer("");
filePromises.push(new Promise((resolve) => {
entry
//.on('data', data => contents += data.toString())
.on('data', (data) => {
buffer = Buffer.concat([buffer,data])
})
.on('end', () => {
//files[file].contents = contents;
files[file].contents = buffer.toString();
resolve();
});
}));
} else {
entry.autodrain();
}
});
...
The text was updated successfully, but these errors were encountered: