Skip to content

Commit 6adcd24

Browse files
fix: convert string to buffer
Signed-off-by: Nicklas Silversved <nicklas.silversved@digg.se>
1 parent c08fd2d commit 6adcd24

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/util/excelReportProcessor.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export class ExcelReportProcessor {
160160
*/
161161
private enableFullCalcOnLoad(workbook): void {
162162
workbook.workbook.calcPr['@_fullCalcOnLoad'] = '1';
163-
this.zip.updateFile('xl/workbook.xml', this.builder.build(workbook));
163+
const xmlString = this.builder.build(workbook);
164+
const xmlBuffer = Buffer.from(xmlString, 'utf8');
165+
this.zip.updateFile('xl/workbook.xml', xmlBuffer);
164166
}
165167

166168
/**
@@ -251,7 +253,10 @@ export class ExcelReportProcessor {
251253
resultColumn.v = valueMap[status];
252254
}
253255
});
254-
this.zip.updateFile(sheetPath, this.builder.build(sheet));
256+
257+
const xmlString = this.builder.build(sheet);
258+
const xmlBuffer = Buffer.from(xmlString, 'utf8');
259+
this.zip.updateFile(sheetPath, xmlBuffer);
255260
}
256261

257262
/**

0 commit comments

Comments
 (0)