AlaSQL is based on unpaid voluntary work. Thank you for taking the time to make it better.
Programming question?
Something not working as expected?
I have tried to import and read the multiple sheets of Excel file using browser. But I am able to read only first sheet, Can anyone help me out to import & read all the sheets of excel file?
Please provide the code you are using. Even better if its a working example on jsfiddle.net
Just reopen this issue when the example code and example excel files have been provided...
Hi mathiasrw, Here is an example code to import xlsx file http://jsfiddle.net/3ve90afo/. The problem is that if we upload multiple sheets of excel, will be getting json data only for the first sheet, rest of other sheets data are not getting converted and displayed. Kindly advise me on this..
Any updates??? :(
at the moment alasql only looks at first fiels. to fix it one needs to make alasql look for more files - or you must manually handle the event and extract the files and pass them to alasql one by one.
So - its a new feature. I added the "new feature" label and I added "Please help out" to indicate that any pull request with code fixing this is more than welcome.
Can you show example as to how to manually handle the event for reading more files?
I tried using alasql.promise by passing each file but doesn't seem to work - gives _cannot read undefined of undefined_ error.
HTML -
JS -
loadFile = function(event) {
var files = event.target.files; // FileList object
// files is a FileList of File objects. List some properties.
var output = [];
for (var i = 0; i
console.log(files.length + ", " + files[i].name); // file names printed properly
alasql.promise('SELECT * FROM XLSX(file,{headers:false})')
.then(function(data){
console.log(data);
})['catch']
(function(err){
console.log('Error:', err);
});
}
Is this solved or not..?
Is this functional already? i got an xlsx with multiple sheets (generated with alasql) , but i don't know how can i import all sheets generated before.
Would be awesome if someone could to give this a shot.
We're experiencing the same issue, it actually seems like a bug in alaSql or one of it's libraries.
Look at the fiddle, only csvB will be parsed, starting a second promise kills the first one.