Get started with alasql CDN
MIT licensed
Alasql is a client-side library for working with structured data using SQL-like queries.
Tags:- sql
- nosql
- graph
- alasql
- javascript
- parser
- database
- DBMS
- data
- query
- localStorage
- IndexedDB
- DOM-storage
- SQLite
- JSON
- Excel
- XLSX
- XLS
- CSV
- webworker
Stable version
Copied!
How to start using alasql CDN
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.cdnhub.io/alasql/4.3.0/alasql.min.js"></script>
</head>
<body>
<script>
// Define data as a 2-dimensional array
const data = [
['Name', 'Age', 'City'],
['John', 25, 'New York'],
['Jane', 30, 'Chicago'],
['Mike', 35, 'Los Angeles']
];
// Use alasql to convert the data into a Google Sheets-like spreadsheet
const spreadsheet = alasql('SELECT * FROM ?', [data]);
// Perform a calculation using alasql
const sumOfAges = alasql('SUM(?[?A])', {data: data, A: 'Age'});
// Log the result to the console
console.log('Sum of ages:', sumOfAges);
// Update a cell value using alasql
alasql('UPDATE ? SET [1, 1] = "John Doe"', [{Name: ['Name'], Age: ['Age'], City: ['City'], '0': ['John'], '1': ['Age']}]);
// Log the updated data to the console
console.log('Updated data:', spreadsheet.getData());
</script>
</body>
</html>
Copied!
All versions
0.0.40
0.0.41
0.0.43
0.0.44
0.0.45
0.0.46
0.0.47
0.0.48
0.0.49
0.0.50
0.0.51
0.1.0
0.1.1
0.1.10
0.1.2
0.1.3
0.1.4
0.1.5
0.1.6
0.1.7
0.1.8
0.1.9
0.2.0
0.2.1
0.2.2
0.2.3
0.2.4
0.2.5
0.2.6
0.2.7
0.3.0
0.3.1
0.3.2
0.3.3
0.3.4
0.3.5
0.3.6
0.3.7
0.3.8
0.3.9
0.4.0
0.4.1
0.4.10
0.4.11
0.4.2
0.4.3
0.4.4
0.4.5
0.4.6
0.4.7
0.4.8
0.4.9
0.5.0
0.5.1
0.5.3
0.5.4
0.5.5
0.6.0
0.6.1
0.6.2
0.6.4
0.6.5
1.7.2
1.7.3
1.7.5
2.0.0
2.0.1
2.0.2
2.0.3
2.0.4
2.0.5
2.0.6
2.0.7
2.1.0
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
2.1.6
2.1.7
2.1.8
2.2.0
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.3.0
2.4.0
2.4.1
2.4.2
2.5.0
2.5.1
2.5.2
2.5.3
2.5.4
3.0.0
3.1.0
3.1.1
4.0.0
4.0.1
4.0.2
4.0.3
4.0.4
4.0.5
4.0.6
4.1.0
4.1.1
4.1.10
4.1.11
4.1.2
4.1.3
4.1.4
4.1.5
4.1.6
4.1.7
4.1.8
4.1.9
4.2.0
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.2.7
4.3.0
4.3.1
4.3.2
4.3.3
4.4.0
4.5.0
4.5.1
*** 4.5.2