Questions tagged [alasql]

Alasql - is a SQL database and data manipulation library, written in pure JavaScript and designed to work in browsers and Node.js. It provides a SQL language interface and data processing functions to data arrays. The library also provides import/export functions for CSV, TAB, JSON and other data file formats. It can use LocalStorage and IndexedDB as backend storage.

Alasql - 'à la SQL' - is a lightweight JavaScript SQL database designed to work in browser, Node.js, and Apache Cordova. It supports traditional SQL with some NoSQL functionality. Current version of Alasql can work in memory and use file, IndexedDB, and localStorage as a persistent storage.

See also

Useful links

225 questions
1
vote
0 answers

Exporting javascript arrays into XLS with Alasql

I had the task to import excel files in javascript and decided to use AlaSQL. It worked as expected. Now i need to export excel as well and it gets more complicated. I have several arrays that I would like to place separatly. Is it possible to do…
GrinnS
  • 141
  • 12
1
vote
2 answers

AngularJS - Trying to export data to excel

I am trying to export a HTML table into an excel sheet and I am using alasql: $scope.Excelexport =function(){ alasql('SELECT * INTO XLSX("example.xlsx",{headers:true}) FROM ?',[$scope.college.data]); } This doesn't work for me because my data…
user3100209
  • 357
  • 1
  • 4
  • 17
1
vote
1 answer

alasql export to excel saving in html format

In IE9 I get this above window before saving though by clicking save the file is being saved as FILENAME.xls. Also when I try to open the saved file it gives me this below popup message though I can continue by clicking yes Is there anyway that I…
yalkris
  • 2,596
  • 5
  • 31
  • 51
1
vote
1 answer

Select INTO Array or Object

I`m trying to set a result query into an array or JSON object using ALASQL: var resdata2 = [ { A: "test", B: "testB" } ]; // Destination array // Select first and second column values from xlxs alasql('select A,B into ? from xlsx("gohan.xlsx")',…
1
vote
1 answer

How to format date while using alasql

I am using this following way while doing an export to excel alasql.fn.Date = Date; alasql('SELECT new Date(mydateString) AS CUSTOM_DATE INTO XLS("' + filename + '.xls",{headers:true}) FROM ?', [items]); Those above lines are printing in this below…
yalkris
  • 2,596
  • 5
  • 31
  • 51
1
vote
1 answer

How to make alasql work in my asp.net web application work?

i have been following an online example available at fiddle. It clearly shows how to query javascript objects using sql queries. this is the exact situation for me. However, the problem comes in when i try to run this fiddle example in my asp.net…
user3313941
  • 63
  • 1
  • 1
  • 10
1
vote
1 answer

Excel - remove first blank row

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…
Piotr0101
  • 33
  • 3
1
vote
0 answers

read xls from blob using alaSql

I started using alaSQL and looks very promising, the example seems so simple in reading XLS file but I cant make it to work. function testxls() { var f = fileinput.files[0]; …
Genpet
  • 11
  • 2
1
vote
1 answer

Async ran during digest phase

I'm running this code in an Angular service, immediately upon loading the page. The controller $scope is passed as an argument to the function this extract belong to. The function is a $q promise. I am not able to figure out how can I let the…
dmvianna
  • 15,088
  • 18
  • 77
  • 106
1
vote
0 answers

Can't find variable: alasql (in PhoneGap app for iOS) - alasql 0.2.0

If I run the "app" in Chrome on my pc as http, everything works as expected with alasql but after the app is built by PhoneGap Build the alasql functions are not available. All javascript is called after 'deviceready' in the app (but in the…
Roger
  • 11
  • 3
1
vote
2 answers

change the file name dynamically in SELECT * INTO XLSX('cities.xlsx',{headers:true}) FROM ?

I'm using this function to sort and export data to excel window.exportData = function () { data.sort(function(a, b){ return a.destino - b.destino; }); alasql("SELECT * INTO XLSX('cities.xlsx',{headers:true}) FROM ? ", …
RobertoFRey
  • 674
  • 1
  • 5
  • 10
1
vote
1 answer

How to place a date range in alasql query with avg and group by clauses

I have constructed an alasql query with a array as the data source.. the columns in my table are( with 1000+ rows): City, TravelDate, Q1, Q2, Q3, Q4 1, 2015-05-31, 6, 6, 5, 5 My requirement is to find the averages for the questions (under 6)…
skha177
  • 11
  • 3
1
vote
0 answers

alasql compatibility with IE8

I was trying to implement a project using alasql in an IE8 environment but keep getting the same error. The alasql function isnt executing properly. I get the following error- Expected identifier File: alasql.min.js, Line: 7, Column: 9848 i get…
C0d3ine
  • 379
  • 1
  • 3
  • 14
1
vote
0 answers

Pull data from excel using SheetJS library

The following program uses a static JSON object as its data source. I just want to replace the JSON Object with an excel file. It seems to be possible using SheetJS library but I cannot find a working sample that uses a file link instead of a File…
C0d3ine
  • 379
  • 1
  • 3
  • 14
1
vote
0 answers

change data source from fusion tables to excel file(link)

Due to security concerns, I have to port all data from a fusion table to an excel file and still retain the fusion tables functionality which is used as a source for google maps. Now the issue i am facing is i came across alasql. I thought of using…
C0d3ine
  • 379
  • 1
  • 3
  • 14