question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular Material crashes

See original GitHub issue

Hello all,

I’m trying to use this lib with Angular 8 and Angular Materia, and below is my method

async exportExcel(jsonData: any[], headers: TableColumn[], fileName: string, config?: ExcelRowConfiguration  ) {
    // create workbook and worksheet
    let workbook = new Workbook();
    let worksheet = workbook.addWorksheet(fileName);

    if (!config) {
      config = new ExcelRowConfiguration();
    }

    //config.fonts = excel title config
    //config.alignment = excel header config
    this.generateFileTitle(fileName, worksheet, config);
    this.generateHeaderRow(headers, worksheet, config);
    this.generateDataRows(jsonData, worksheet, headers);
    await this.generateExcelFile(workbook, fileName);
  }

For some reason when the code is like above, my material components acquire stranger behaviors. For example: I click to open a mat-expansion-panel and it expands only if I click in other area, I have to click twice to export table, and other stranger behaviors. But when I comment the method’s body everything work fine. Is known any issue with Angular Material Components and ExcelJS?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:20

github_iconTop GitHub Comments

1reaction
onur-ozguzelcommented, Sep 15, 2020

Ok so far i’ ve changed my pollyfills.ts like this:


import 'exceljs'; // will be removed in Angular 8 > & excejs > 4.0.0
import 'zone.js/dist/zone';  // Included with Angular CLI.

After i’ ve upgraded both Angular & exceljs i’ ll remove this exceljs import & make the module lazy load again.

For now i hope to it’ ll work like this.

Thank you all.

1reaction
tsiegleauqcommented, Sep 14, 2020

I cannot reproduce this error anymore on v4.1.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Mat-Form Causing Web Page to Crash Without Error ...
For some reason, the web page crashes whenever the mat-form-field block is added to the code. I have tried commenting various segments of...
Read more >
serve crashes randomly after upgrading to Angular 12 #20801
While running ng serve for a few hours it will randomly crash with an error. When I upgraded to angular 12, I also...
Read more >
Changes in Angular 6.1.5 Pro crashes browser
I'm not sure what changed in the Angular Pro version between 6.1.3 & 6.1.5, but I'm seeing my browser (Chrome 67.0.3396.99 64-bit) hang...
Read more >
Angular 6 — MEAN Stack Crash Course — Part 2 - Medium
In this second part we'll now focus on building the back-end of the MEAN Stack application by using Node.js, Express, MongoDB. You'll also...
Read more >
The Modern Angular Crash Course - 2022 - YouTube
This is part 1 of a 3 part series where we are going to learn angular in great detailSecond ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found