I have added xlsx.full.min.js file.
here is my code
var workbook = XLSX.read(data, { type: 'binary' });
var sheetName = workbook.SheetNames[0];
var excelData = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[sheetName]);
For typescript, you have to install @types/xlsx by npm install @types/xlsx --save.
Import it this way:
import * as XLSX from 'xlsx';
this is issue on their site.
You have to install the XLSX module using npm install xlsx then you have to intialize XLSX variable on top of your code if(typeof require !== 'undefined') XLSX = require('xlsx');. Check the library details: https://www.npmjs.com/package/xlsx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With