Skip to content

Commit

Permalink
Merge pull request #2 from Siemienik/master
Browse files Browse the repository at this point in the history
Fixation2 propose
  • Loading branch information
jacekkoziol authored Jan 15, 2021
2 parents c302007 + 640f0dd commit ce560ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export class GenerateXLSXFile {
return workbook.xlsx.load(templateFileBuffer);
};

const result: Excel.Workbook = await this.renderer.render(templateFactory, this.viewModel);
const vmClone = JSON.parse(JSON.stringify(this.viewModel)); // workaround
const result: Excel.Workbook = await this.renderer.render(templateFactory, vmClone);
const buffer: Excel.Buffer = await result.xlsx.writeBuffer()
// this.saveBlobToFile(new Blob([buffer]), `${Date.now()}_result_report.xlsx`);
setTimeout(() => {
Expand Down

0 comments on commit ce560ec

Please sign in to comment.