2

I'm using exceljs plugin to export file from my angularjs application. I added it into bower.json and into package.json.

package.json:

enter image description here

bower.json:

enter image description here

I added this is into my exportCsv function to export csv file

 $scope.export = function() {
    $scope.filename = 'Owlink by Tessi.csv';
    $scope.title = 'Owlink by Tessi';
    const reclamationListResult = [];
    const header = ['Produit', 'Famille', 'Typologie', 'Date de création'];
    const titleRowCell = 'A1:R1';
    let ExcelJS;
    define(['require', 'ExcelJS'], function (require) {
      // var namedModule = require('ExcelJS');
       ExcelJS = require('exceljs/excel.js');
    });
    const workbook = new ExcelJS.Workbook();
    const worksheet = workbook.addWorksheet('Sharing Data');
    const colsSizeMap = new Map([
      ['1', '20'],
      ['2', '20'],
      ['3', '20'],
      ['4', '20']]);

I get this problem :

enter image description here

How to resolve it?

slema imen
  • 75
  • 1
  • 10

0 Answers0