Giter Site home page Giter Site logo

database-js-xlsx's Introduction

database-js-xlsx

Database-js Wrapper for XLSX files

About

Database-js-firebase is a database-js wrapper around the xlsx-populate library by Dave Johnson.

Tables are emulated by using a defined address Sheet1$A1:C52, or just a sheet name Sheet1. The first row must be the column headings.

xlsx-populate works with an in-memory copy of the spreadsheet, so the underlying spreadsheet can be changed after it is loaded by database-js-xlsx. When the connection is closed, the in-memory copy is written back to disk and any changes outside of the database-js-xlsx will be overwritten.

xlsx-populate works cross platform. This means that database-js-xlsx also works cross platform, unlike the database-js-adodb driver which is Windows only.

database-js-xlsx uses the node-sqlparser library by fish. SQL commands are limited to SELECT, UPDATE, INSERT and DELETE. WHERE works well. JOINs are not allowed. GROUP BY is not yet supported. LIMIT and OFFSET are combined into a single LIMIT syntax: LIMIT [offset,]number

Usage

var Database = require('database-js2');

(async () => {
    let connection, statement, rows;
    connection = new Database('database-js-xlsx:///test.xlsx');
    
    try {
        statement = await connection.prepareStatement("SELECT * FROM Sheet1 WHERE State = ?");
        rows = await statement.query('South Dakota');
        console.log(rows);
    } catch (error) {
        console.log(error);
    } finally {
        await connection.close();
    }
})();

database-js-xlsx's People

Contributors

mlaanderson avatar

Watchers

James Cloos avatar Thiago Delgado Pinto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.