Guest User

Untitled

a guest
Jan 11th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Component, OnInit } from '@angular/core';
  2. import { Excel } from 'exceljs';
  3.  
  4. @Component({
  5.   selector: 'app-root',
  6.   templateUrl: './app.component.html',
  7.   styleUrls: ['./app.component.scss']
  8. })
  9. export class AppComponent implements OnInit {
  10.   ngOnInit(): void {
  11.     this.runExcel();
  12.   }
  13.   title = 'exceljs0test';
  14.  
  15.   async runExcel() {
  16.     // read from a file
  17.     let workbook = new Excel.Workbook();
  18.     let ws = await workbook.csv.readFile('ff');
  19.   }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment