alasql: alasql.min.js:10 Uncaught Error: Please include the xlsjs library

Something wrong with the library. i try to upload a XLS files ( EXCEL 97 -2003 workbook) through http://alasql.org/demo/008file/.

It shows an error alasql.min.js:10 Uncaught Error: Please include the xlsjs library

i try to import the xlsx or xls files from cdnjs.com but it seems that it is not support.

importing CSV and XLSX are no problem but not XLS.

image

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@lzzattack I had the same problem.

I solved this:

import alasql from 'alasql'; import XLSX from 'xlsx';

alasql.utils.isBrowserify = false; alasql.utils.global.XLSX = XLSX;

Sorry for being late to the party… All the angular guys, use this:-

import * as alasql from 'alasql';
import * as XLSX from 'xlsx';
alasql['utils'].isBrowserify = false;
alasql['utils'].global.XLSX = XLSX;

No need to include anything in your index.html or angular.cli.json. Enjoy!

this is my code: alasql(‘SELECT * INTO XLSX(“test.xlsx”,{headers:true}) FROM ?’, [vm.areaData]) but… 2017-10-21 6 20 29

this is my version: 2017-10-21 6 22 44 This is my way of using it 2017-10-23 10 24 55 oh!!I user vue-cli create project.

Btw: for excel support please use

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.7.12/xlsx.core.min.js"></script>

I can confirm this solves the problem in react too

@mathiasrw The versions need to be updated in the browser demos. Here’s an updated plnkr of the 008file demo: http://plnkr.co/edit/Atqtg7RKrKbXtJ8eH6Qz?p=info

<script src="https://unpkg.com/alasql@0.4.2/dist/alasql.min.js"></script>
<script src="https://unpkg.com/xlsx@0.11.5/dist/xlsx.core.min.js"></script>