|
|
@ -146,18 +146,12 @@ export class Exporter { |
|
|
|
|
|
|
|
|
|
|
|
private _writeCsv(stream, series) { |
|
|
|
private _writeCsv(stream, series) { |
|
|
|
for(let row of series.values) { |
|
|
|
for(let row of series.values) { |
|
|
|
const isEmpty = _.every( |
|
|
|
let csvRow = {}; |
|
|
|
_.slice(row, 1), |
|
|
|
for(let col in series.columns) { |
|
|
|
val => val === null |
|
|
|
csvRow[series.columns[col]] = row[col]; |
|
|
|
); |
|
|
|
|
|
|
|
if(!isEmpty) { |
|
|
|
|
|
|
|
let csvRow = {}; |
|
|
|
|
|
|
|
for(let col in series.columns) { |
|
|
|
|
|
|
|
csvRow[series.columns[col]] = row[col]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
stream.write(csvRow); |
|
|
|
|
|
|
|
this._task.progress.exportedRowsCount++; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stream.write(csvRow); |
|
|
|
|
|
|
|
this._task.progress.exportedRowsCount++; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|