I have imported an XLSX file but i cannot seem to use the result outside its function:
var dataResult;
alasql('select * from xlsx("adat.xlsx",{headers:true, sheetid:"adat", range:"A1:B21"})',
[],function(data) {
dataResult= data;
});
console.log(dataResult);
The result of the console.log is "undefined"
Could someone help me solve this problem? Thank you in advance.