alasql: can not import csv file and get file data

use this code can not import file. HTML:

<input type="file" ng-mouseleave="loadFile($event)" />

Controller:

$rootScope.loadFile = function ($event) {
    if (event.fromElement.files.length==0) {
        return(false);   // leave in case no file was chosen
    };
    alasql('SELECT * FROM FILE(?,{headers:true})', [event], function (data) {
        $rootScope.eData = data;     //  eData contains the JSON representation of the Excel sheet rows
    }); 
};

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Same as as #650