mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-27 07:56:28 +00:00
fixed export from Mongo into Excel and CSV #240
This commit is contained in:
@@ -30,6 +30,7 @@ async function writer({ fileName, encoding = 'utf-8', header = true, delimiter,
|
|||||||
csvPrepare.pipe(csvStream);
|
csvPrepare.pipe(csvStream);
|
||||||
csvStream.pipe(fileStream);
|
csvStream.pipe(fileStream);
|
||||||
csvPrepare['finisher'] = fileStream;
|
csvPrepare['finisher'] = fileStream;
|
||||||
|
csvPrepare.requireFixedStructure = true;
|
||||||
return csvPrepare;
|
return csvPrepare;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class ExcelSheetWriterStream extends stream.Writable {
|
|||||||
this.structure = null;
|
this.structure = null;
|
||||||
this.fileName = fileName;
|
this.fileName = fileName;
|
||||||
this.sheetName = sheetName;
|
this.sheetName = sheetName;
|
||||||
|
this.requireFixedStructure = true;
|
||||||
}
|
}
|
||||||
_write(chunk, enc, next) {
|
_write(chunk, enc, next) {
|
||||||
if (this.structure) {
|
if (this.structure) {
|
||||||
|
|||||||
Reference in New Issue
Block a user