I have a really big excel file with first row blank, second row with header and rest rows containing data.
I need to select only part of data from that file.
Because it should be done on client side in javascript I decided to use AlaSql library (alasql.org), where I can precisely select data I need with sql language.
Fe: first I count number of rows than select some of data (with headers) using range:
var sql = "SELECT value COUNT(*) FROM FILE(?,{headers:true})"; //count rows
alasql(sql,[event],function(numberofrows){
var sql2 = "select column1, column2 from FILE(?, headers:true,range:'A2:Z"+numberofrowss"'})";
//I need only two columns I can use here where/having/limit etc. conditions
alasql(sql2,[event],function(res){
... // other steps
}}
Is there more effective way to do the job (not counting rows first)? Maybe it can be used something similar to range defined like 'A2:ZZ'? Using range A2:A10000000 consumes all memory...
Any suggestions? Other library? Maybe there is a way to remove blank row first?