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.

The demo is broken.
I will look into making a jsfiddle example...
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 did try that, but it doesn't work for xls format.
It will solve
It shows an error alasql.min.js:10 Uncaught Error: Please include the xlsjs library

i tested it before submitting this issue.
XLS support have been added to the example. Please verify its working now...

the problem is still existed.
hmmmm
Same issue is occuring to me
@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/[email protected]/dist/alasql.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/xlsx.core.min.js"></script>
Awesome! I have updated https://github.com/agershun/alasql-org/blob/gh-pages/demo/008file/index.html so the change should be reflected on http://alasql.org/demo/008file/ any time soon
this is my code:
alasql('SELECT * INTO XLSX("test.xlsx",{headers:true}) FROM ?', [vm.areaData])
but......

this is my version:

This is my way of using it

oh锛侊紒I user vue-cli create project.
@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;
hi @alexvingg
After using
alasql.utils.isBrowserify = false;
alasql.utils.global.XLSX = XLSX;
I got error: error TS2339: Property 'utils' does not exist on type 'AlaSQL' in my angular application
could you please elaborate about utils in alasql as I did not manage to find any info about them
hi @fuser84
This error happens because alasql does not find the XLSX dependency. My solution was to import the XLSX dependency and manually inject it into alasql. For it to work it is required isBrowserify = false.
I only tested with vue js.
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!
@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;
Well done with these configs in Vue. Thanks a lot.
I can confirm this solves the problem in react too
Most helpful comment
@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;