Open Eivlys opened 7 years ago
Are you running any code to get the error?
I'm running
alasql('SELECT * INTO XLSX("current.xlsx",{headers:true}) FROM ?',[$scope.exportList]);
$scope.exportList is the data i got from node server
What format is the data from the node server?
the data is an object [ object, object, object ] ,like:
[ { name:'A', id: 1 }, { name: 'B', id: 2 }, { name: 'C', id: 3 } ]
What do you get if you do a
alasql('SELECT * INTO XLSX("current.xlsx",{headers:true}) FROM ?',[[ { name:'A', id: 1 }, { name: 'B', id: 2 }, { name: 'C', id: 3 } ]]);
?
well if use[ { name:'A', id: 1 }, { name: 'B', id: 2 }, { name: 'C', id: 3 } ]
,I can get the excel correctly.
so there is something wrong with the data i got, what form it should be?
I dont know what to say. if $scope.exportList
is truely in the format of [ { name:'A', id: 1 }, { name: 'B', id: 2 }, { name: 'C', id: 3 } ]
it does not make sense that its not working?
I am having the same issue nearly. This dead simple JSFiddle works for me just fine, and is how I discovered this library
When I use the exact CDN scripts and paste in the exact contents of the fiddle (except I've moved the function out of the "window" object and attached it to my Knockout.js page model object) the error is what I get
Have you guys had a look at https://github.com/agershun/alasql/wiki/Angular.js ?
I'm using alasql with AngularJs , and include it in the comment way before requireJS:
but i got an error in the console:
what can i do to fix this?