Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.

Overview

Jspreadsheet CE v4: The JavaScript spreadsheet

Jexcel CE has been renamed to Jspreadsheet CE

News



Jspreadsheet CE is a lightweight Vanilla JavaScript plugin to create amazing web-based interactive HTML tables and spreadsheets compatible with other spreadsheet software. You can create an online spreadsheet table from a JS array, JSON, CSV or XSLX files. You can copy from excel and paste straight to your Jspreadsheet CE spreadsheet and vice versa. It is very easy to integrate any third party JavaScript plugins to create your own custom columns, custom editors, and customize any feature into your application. Jspreadsheet CE has plenty of different input options through its native column types to cover the most common web-based application requirements. It is a complete solution for web data management. Create amazing applications with Jspreadsheet CE JavaScript spreadsheet.

Main advantages

  • Make rich and user-friendly web interfaces and applications.
  • You can easily handle complicated data inputs in a way users are used..
  • Improve your user software experience.
  • Create rich CRUDS and beautiful UI.
  • Compatibility with excel: users can move data around with common copy and paste shortcuts.
  • Easy customizations with easy third-party plugin integrations.
  • Lean, fast and simple to use.
  • Thousands of successful user cases.
  • Speed up your work dealing with difficult data entry in a web-based software.

Screenshot

The JavaScript spreadsheet

Installation

As node package

npm install jspreadsheet-ce

As standalone library/js plugin

Download ZIP

put and use the files of dist folder in your project (js library and css files)

With a framework

See examples section for code examples of jspreadsheets with popular frameworks

Basic demo

A basic example to integrate the JavaScript spreadsheet in your website to create your first online spreadsheet. https://codepen.io/hchiam/pen/qBRzXKK

Usage

Add jexcel/jspreadsheet and jsuites to your html file

<script src="https://bossanova.uk/jspreadsheet/v4/jexcel.js"></script>
<script src="https://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v4/jsuites.css" type="text/css" />
<link rel="stylesheet" href="https://bossanova.uk/jspreadsheet/v4/jexcel.css" type="text/css" />

You should initialize your table based on a div container, such as:

<div id="spreadsheet"></div>

To initialize a Jspreadsheet CE table you should run JavaScript, such as:

var data = [
    ['Jazz', 'Honda', '2019-02-12', '', true, '$ 2.000,00', '#777700'],
    ['Civic', 'Honda', '2018-07-11', '', true, '$ 4.000,01', '#007777'],
];

jspreadsheet(document.getElementById('spreadsheet'), {
    data:data,
    columns: [
        { type: 'text', title:'Car', width:120 },
        { type: 'dropdown', title:'Make', width:200, source:[ "Alfa Romeo", "Audi", "Bmw" ] },
        { type: 'calendar', title:'Available', width:200 },
        { type: 'image', title:'Photo', width:120 },
        { type: 'checkbox', title:'Stock', width:80 },
        { type: 'numeric', title:'Price', width:100, mask:'$ #.##,00', decimal:',' },
        { type: 'color', width:100, render:'square', }
     ]
});

Serve your html file and then you will get the rendered table in your browser

sampleTable

Development

See development

Examples

  • Basic demo
    Simple demo (as in codepen)

  • Basic demo for developing
    Demo using library from dist folder, ready to use for development of jspreadsheet

  • React Implementation
    A full example on how to integrate Jspreadsheet CE with React.

  • VUE Implementation
    A full example on how to integrate Jspreadsheet CE with Vue.

  • Search and pagination
    Full spreadsheet example with search and pagination to bring great compatibility for those who love datatables.

  • Column types
    Learn more about the powerful column types. This example brings all native column types and how to create your own custom type.

  • Javascript dropdown
    Full examples on how to handle simple, advanced, multiple, autocomplete and conditional dropdowns. Create amazing JavaScript tables using categories and images in your dropdowns.

  • Javascript calendar, date and datetime picker
    Example from basic to advanced calendar usage, date and datetime picker.

  • Image upload
    This examples shows how to upload images to your spreadsheet.

  • Programmatically updates
    How to update your spreadsheet and its data by JavaScript.

  • Table Style
    Bring a very special touch to your applications customizing your JavaScript spreadsheet.

  • Events
    Learn how to handle events on Jspreadsheet CE.

  • Importing data
    How to import data from an external CSV, json file or XLSX.

  • Formulas
    Unleash the power of your tables bringing formulas and custom JavaScript methods on your Jspreadsheet spreadsheet.

  • Custom toolbars
    Full example on how to enable nor customize your JavaScript spreadsheet toolbar.

  • Column comments
    Allow comments in your table spreadsheet.

  • Headers
    Enabled nested headers in your spreadsheet and learn how to set or get header values.

  • Translations
    How to translate the default messages from Jspreadsheet.

  • Merged cells
    Full example on how to handle merge cells in your JavaScript tables.

  • Sorting columns
    Example how to sort the table by a column via JavaScript.

  • Lazy loading
    This example brings a very nice feature to deal with large table datasets.

Jspreadsheet CE History

Jspreadsheet CE 4.6

Jexcel has been renamed to Jspreadsheet

Jspreadsheet CE 4.0.0

A special thank to the FDL - Fonds de Dotation du Libre support and sponsorship that make this version possible with so many nice features.

  • Support workbooks/tabs
  • Create a dymic jexcel table from a HTML static element
  • Highlight the border from cells after CTRL+C
  • Footer with formula support
  • Multiple columns resize
  • JSON update support (Helpers to update a remote server)
  • Global super event (centralized method to dispatch all events in one)
  • Custom helpers: =PROGRESS (progressbar), =RATING (5 star rating)
  • Custom helpers: =COLUMN, =ROW, =CELL, =TABLE, =VALUE information to be used on formula execution
  • Dynamic nested header updates
  • A new column type for HTML editing
  • New flags such as: includeHeadersOnCopy, persistance, filters, autoCasting, freezeColumns
  • New events such as: onevent, onchangepage, onbeforesave, onsave
  • More examples and documentation

Jspreadsheet CE 3.9.0 (Jexcel)

  • New methods
  • General fixes

Jspreadsheet CE 3.6.0 (Jexcel)

  • Better formula parsing
  • New events
  • New initialization options
  • General fixes

Jspreadsheet CE 3.2.3 (Jexcel)

  • getMeta, setMeta methods
  • Npm package with jSuites
  • General fixes

Jspreadsheet CE 3.0.1 (Jexcel)

Jspreadsheet CE v3 is a complete rebuilt JavaScript Vanilla version. For that reason it was not possible to keep a complete compatibility with the previous version. If you are upgrading you might need to implement a few updates in your code. If you have questions, you can review the article upgrading from Jspreadsheet CE v2 or Handsontable.

The Jspreadsheet CE v3 brings lot of great new features:

  • Drag and drop columns.
  • Resizable rows.
  • Merge columns.
  • Search.
  • Pagination.
  • Lazy loading.
  • Full screen flag.
  • Image upload.
  • Native color picker.
  • Better mobile compatibility.
  • Better nested headers compatibility.
  • Amazing keyboard navigation support.
  • Better hidden column management.
  • Great data picker: dropdown, autocomplete, multiple, group options and icons.
  • Importing from XLSX (experimental).

Big improvements are included, such as:

  • Complete new formula engine with no external dependencies with much faster results.
  • Absolutely no selectors, means a much faster application.
  • New native columns.
  • jQuery is not required anymore.
  • React, Vue and Angular examples.
  • XLSX support using a custom sheetjs (experimental).

Jspreadsheet CE 2.1.0 (Jexcel)

We are glad to bring you the latest jQuery plugin version, with the following improvements:

  • Mobile touch fixes.
  • Paste fixes & New CSV parser.

Jspreadsheet CE 2.0.0 (Jexcel)

  • New radio column.
  • New dropdown with autocomplete and multiple selection options.
  • Header/body separation for a better scroll/column resize behavior and compatibility.
  • Better text-wrap including alt+enter excel compatibility.
  • New set/get meta information.
  • New set/get config parameters.
  • New set/get programmatically cell style.
  • New set/get cell comments.
  • New table custom toolbar.
  • New responsive calendar picker.

Jspreadsheet CE 1.5.7 (Jexcel)

  • Checkbox column type improvements.
  • Destroy jQuery table updates.

Jspreadsheet CE 1.5.1 (Jexcel)

  • Spreadsheet data overflow and fixed headers. See an example.
  • Navigation improvements.

Jspreadsheet CE 1.5.0 (Jexcel)

  • Relative insertRow, deleteRow, insertColumn, deleteColumn.
  • Redo, Undo action tracker for insertRow, deleteRow, insertColumn, deleteColumn, moveRow.
  • New formula column recursive chain.
  • New alternative design option bootstrap-like.
  • updateSettings updates.

Official websites

Community

Contributing

See contributing

Copyright and license

Jspreadsheet CE is released under the [MIT license]. Contact [email protected]

Other interesting tools

Comments
  • Paste source

    Paste source

    Hello Paul When you paste something coming from an excel, a new line is added When you paste something coming from something else, no new line is added I have teste with a text file, a word file and a javascript. One coming from notepad ++, one from word and one from netbeans it seems that only data coming from excel add a new line

    opened by felixvandal 24
  • Hide Columns

    Hide Columns

    Hello. Is there any way of hide a column? When I use $('column').hide(), I loose all my CSS configuration, so could be very nice to have an implementation of an event to hide a column by it's index.

    opened by VictorCandido 23
  • setValue code path crashing on cell[x]

    setValue code path crashing on cell[x]

    I'm upgrading from v2 to v3 to test v3 and have run into an issue when attempting to set a cell value of type text. Am getting a JS error on the lines below, referencing cell[i] as undefined:

                if (keys.length > 0) {
                    for (var i = 0; i < keys.length; i++) {
                        var x = cell[i].getAttribute('data-x');
                        var y = cell[i].getAttribute('data-y');
    
                        // Update cell
                        records.push(obj.updateCell(x, y, value));
    
    

    I've debugged into the code and cell is an element already and, for example, NOT a jQuery object, so cell.getAttribute would work but cell[i] is undefined.

    opened by PRISMAY 22
  • How to set value and formula

    How to set value and formula

    I would like to be able to capture formulas, and return the value without needing to set a constant JS function for each.

    I am trying to figure out how to do the following:

    • To use beforeChange to capture the Value & Formula of the cell.
    • If the formula is present in my list of predefined formulas, do some actions (send the formula and the values referenced off with gRPC to another service)
    • When my calculated value is returned, update the cell with value (but keep the formula there)

    I have in particular been struggling on how to set a value & formula and bypass the current formula executor.

    p.s. Thank you for this incredible library!

    opened by eiso 20
  • show A-G columns by defaults

    show A-G columns by defaults

    Hi Paul, Hope you are doing great !!1

    Actually I have to show the columns A-G and 8 rows by default unless data is in 2 rows and 2 columns. If data is in 2 rows and two columns then I want to show the rest cells blank but look like an excel. Please provide the solution for that

    Thanks

    opened by gulshan-escalon 17
  • Copy & Paste Feature

    Copy & Paste Feature

    Hi,

    Don't know if this was already reported here or not, I tried to search for similar problems but could not find it. When pasting a "large" volume of rows, it is not responsive. It seems that the copy paste gets stuck as if something which is iterative is running in the backend and it takes a lot of time.

    Any way you could please look at this?

    Thanks!

    opened by danieljsc 16
  • Data from database with edit

    Data from database with edit

    How to get data from remote database, once user start typing into cell? I saw dropdown with autocomplete but it is not what I need, because database have thousands of records. Additional, cell need to be edited once it receive value from database. How to do that, please?

    opened by krosoftware 16
  • Insert/Update/Delete rows in the current sheet for multiple tabs

    Insert/Update/Delete rows in the current sheet for multiple tabs

    Hello Paul,

    The truth is that I am very interested in the functionality of multiple tabs in the same spreadsheet.

    Is this functionality free ?? If not, how much does it cost? I have not found the prices for any site on the web.

    Now I can insert a row in my 1-tab spreadsheet this way:

    var mySpreadsheet = jexcel(document.getElementById('spreadsheet1'), {
    			data: data1,
    			csvFileName: 'filename',
    		        csvHeaders:true,
    			colHeaders: ['a', 'b'],
    			columns: [{ type:'text', width:100 },
    				  { type:'text', width:270 }],
    			ondeleterow: functionOnDeleteRow
    		});
    

    mySpreadsheet.insertRow();

    Even I can update some column value (for example, total money) if I delete/insert rows().

    How would it be if I have two tabs?? How would be the way to add a row or update it for the current sheet? Could you give an example?

    Thank you in advance!!

    Thank you very much!

    opened by pablosolar 14
  • working directly with JSON

    working directly with JSON

    Hello! I am starting out with jexcel and I love it! I am wondering is there any support to load data into the table as json? If this is not the correct place for this please let me know!

    I have tried the following code:

    $('#my').jexcel({
        url:'http://localhost:8080/partners.json',
        colHeaders: ['a' ,'b', 'c', 'd', 'e']
      });
    

    and it seems to only show the amount of json objects that are located at that url. I have dug into your example of programmatically-changes specifically this example:

    setData: Update the table data
    @Param json newData - New json data, null will reload what is in memory.
    @Param boolean ignoreSpare - ignore configuration of minimal spareColumn/spareRows
    

    In the console I dug down and see that button is tied to this:

    $('#setDataButton').click(function () {
        data2 = [
            ['My car', 2001, 2000, '2006-01-01'],
            ['Test', 2010, 5000, '2005-01-01']
        ];
        $('#my').jexcel('setData', data2);
    });
    

    Which isn't json.

    In the end I really like this plugin but curious as to if it is possible to load JSON data into the table?

    opened by cstarling 14
  • error pasting date into calendar cell

    error pasting date into calendar cell

    If I paste a date into a cell of type "calendar", the fields (day,month,year) get mixed up. What should be DD-MM-YYYY (as defined in my options->format property), it shows as YYYY-MM-DD.

    For example, if I paste the data "19-10-1998", it appears as "1998-10-19" in the cell. And when I bring up the calendar picker it shows the month of Oct and Year of 19.

    It works correctly if I type a date in manually.

    Here is my code

    $('#my').jexcel({ minDimensions:[8,15], colHeaders: ['Last Name','First Name','Middle Name','Birth Date','Grade','Gender','SPED','ELL'], colWidths: [180,180,180,100,80,80,80,80], columns: [ { type: 'text'}, { type: 'text'}, { type: 'text'}, { type: 'calendar', options: { format:'DD-MM-YYYY' }}, { type: 'dropdown',source:['K',1,2,3,4,5,6]}, { type: 'dropdown',source:['m', 'f'] }, { type: 'dropdown',source:['y', 'n'] }, { type: 'dropdown',source:['y', 'n'] } ] });

    opened by sonofwill 12
  • japp: import/require for webpack from npm

    japp: import/require for webpack from npm

    Hi, I'm trying to follow Vue integration guide: https://bossanova.uk/jexcel/v3/examples/vue

    I'm using webpack to bundle liblaries in .vue components instead of hardcoding .js/.css imports from cdn/bossanova.uk One problem I have is that japp.js is not included in your npm bundle and the link to https://bossanova.uk/jexcel/v3/japp.js does not work - file might not exist? Would be nice if japp.js was included in npm module for jexcel or at least had it's own npm. When used with Vue/React/Angular, libraries can be code spitted and imported only when needed in components/views rather than being declared for download upfront.

    Thank you for taking time to make a version without jQuery! ^^

    opened by Zireael 11
  • Drag events missing

    Drag events missing

    Hi, I want call an API immediately after dragging some cells. How do I get the information about the cells I dragged ? I couldn't find any ondragAfter or ondragCompleted events for this.

    opened by jerinantony11 0
  • Event keyDownControls remains active even if element no longer exists

    Event keyDownControls remains active even if element no longer exists

    The problem is that

    document.addEventListener("keydown", jexcel.keyDownControls);

    Remains active even when jspreadsheet object no longer exists.

    And if you initialize jspreadsheet again on the same page, this keyDownControls event will fire twice, thrice, ... (depends on how many times you have initialized jspreadsheet).

    This isn't good.

    I think there should be added some instance ID to jspreadsheet html element, and if there is no html element on page, event must be unregistered.

    And imagine you have 2 jspreadsheet objects. You press Del, and it fires on both jspreadsheet objects, as keyDownControls doesn't know on which jspreadsheet object it was triggered...

    opened by nightrider77 1
  • Consider using textContent rather than innerText

    Consider using textContent rather than innerText

    Is there a rationale for setting innerText rather than textContent in the setData function?

    They do behave a bit differently -- I think textContent allows for more whitespace in some scenarios. However, it also appears to be faster than innerText which may be a nice added bonus to an already fast spreadsheet library.

    Context: I had to dig pretty deep to understand why my tests were failing -- they rely on jsdom which is the go-to headless engine for jest. Turns out that jsdom doesn't support innerText due to its reliance on a layout engine. So for me, mocking innerText's setter and getter to be textContent helped make my tests pass. The workaround mentioned in the jsdom issue solved my problems, so I'd call this a suggestion rather than a request. But it could help users who write react applications and end up using a testing suite such as Jest that relies on jsdom.

    opened by davidroeca 0
  • checkbox can be still changed for read only cells

    checkbox can be still changed for read only cells

    If a cell is set as readonly, it can be changed if the column type is 'checkbox' by clicking with the mouse on the checkbox. By keyboard the checkbox state can not be changed. In such a case the events "onbeforechange", "onchange" are not fired.

    opened by Hypnos3 1
  • Mask seems broken on footer columns

    Mask seems broken on footer columns

    I've noticed that masks on footer columns seems to be broken due to an issue with this line:

    https://github.com/jspreadsheet/ce/blob/fbcc95aaf18e96b831e0770717b05210be4a297c/dist/index.js#L9366

    I'm not sure what the reason for this might be +obj.records.length in +obj.records.length + i but it will cause an issue further down when gettings the options for that column here:

    https://github.com/jspreadsheet/ce/blob/fbcc95aaf18e96b831e0770717b05210be4a297c/dist/index.js#L7109

    And will only get the right column when obj.records.length is 0.

    opened by olaherrdahl 0
Releases(v4.6.0)
Websheetjs - Lightweight JS library to render website sections with data from Google Spreadsheets

websheet.js Render website sections with lazy-loaded data from Google Spreadsheets It's lightweight, fast, free and open-source ! See how it works, fu

Pierre Avinain 29 Oct 4, 2022
An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor.

Obsidian Excel to Markdown Table An Obsidian plugin to paste Excel tables as Markdown tables in Obsidian editor. Demo You can paste the copied Excel d

Ganessh Kumar 108 Jan 4, 2023
Quick spreadsheet viewer in vanilla JS

Heihō Quick spreadsheet viewer in vanilla JS What it does ? The heiho.js script is quick and simple spreadsheet viewer. It is meant to preview the con

Kaloyan Tsvetkov 18 Sep 8, 2022
A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.

Cuberto Mouse Follower A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website. Dependencies GSAP v3 (

Cuberto 410 Dec 30, 2022
How often do you get asked about the gadgets or software that you use? If the answer is quite often, you should be trying show off out. Curate the list of gadgets and software and share it with your fans and followers.

Show Off - Showcase your setup! How often do you get asked about the gadgets or software that you use? If the answer is quite often, you should be try

Adithya Sreyaj 15 Nov 24, 2022
curtains.js is a lightweight vanilla WebGL javascript library that turns HTML DOM elements into interactive textured planes.

What is it ? Shaders are the new front-end web developpment big thing, with the ability to create very powerful 3D interactions and animations. A lot

Martin Laxenaire 1.4k Jan 1, 2023
Create amazing pixel art murals. 🐸

Pixelate Create amazing pixel art murals with sticky notes. Pixelate is a image editor that shows assembly guides to put art with sticky notes on your

Google 19 Dec 11, 2022
Create a new challenge for jshero.platzi.com, share your experience creating amazing challenges.

JSHero - jshero.platzi.com ?? Create a new challenge for jshero.platzi.com, share your experience creating amazing challenges. Create a new challenge:

Comunidad Platzi 28 Oct 19, 2022
Create a new challenge for jshero.platzi.com, share your experience creating amazing challenges.

JSHero - jshero.platzi.com ?? Create a new challenge for jshero.platzi.com, share your experience creating amazing challenges. Create a new challenge:

PlatziLabs 20 Apr 27, 2022
A Multichain crypto wallet library that supports Ethereum, Solana and other EVM compatible blockchains.

Multichain Crypto Wallet A Multichain crypto wallet library that supports Ethereum, Solana and other EVM compatible blockchains. Installation npm inst

Abdulfatai Suleiman 117 Jan 2, 2023
This is a Google Apps Script library for parsing the form object from HTML form and appending the submitted values to the Spreadsheet.

HtmlFormApp Overview This is a Google Apps Script library for parsing the form object from HTML form and appending the submitted values to the Spreads

Kanshi TANAIKE 18 Oct 23, 2022
Embed Luckysheet (spreadsheet) into Logseq.

logseq-plugin-luckysheet 在 Logseq 中嵌入电子表格 Luckysheet。你也可以用它来维护一张 markdown 表格。 Embed Luckysheet (spreadsheet) into Logseq. You can also use it to maint

Seth Yuan 49 Jan 1, 2023
🎨 Beautify your github profile with this amazing tool, creating the readme your way in a simple and fast way 🚀 The best profile readme generator you will find ⚡

Demo Profile Readme Generator The best profile readme generator you will find! About | Technologies | Requirements | Starting | Contributing ?? About

Mauro de Souza 476 Jan 1, 2023
Contribute on this repository with VALID PRs to HACKTOBERFEST-2022 and earn amazing swags!

LINK- https://rbshop.netlify.app/ Hacktoberfest2022 You can make folders of programming languages and also you can contribute in the repo's below. Fee

Ranodeep Banerjee 17 Oct 25, 2022
This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js

This is a vanilla Node.js rest API created to show that it is possible to create a rest API using only vanilla Node.js. But in most cases, I would recommend you to use something like Express in a production project for productivity purposes.

Eduardo Dantas 7 Jul 19, 2022
Amazing-Js-Projects

Amazing-Js-Projects This project is a part of the following Open Source Program Levels & Points Level Points Level 0 5 Level 1 10 Level 2 20 Level 3 4

Arpit Jain 124 Jan 3, 2023
An Amazing SlashCommands Handler (With Sharding & Mongo) Made by discord.gg/azury

SlashCommands Handler by The Azury Team If this Git-Repo gets "40" Stars ⭐ i'll add some more Commands! ??️ FEATURES: 1. SlashCommands Support 2. Cont

Masterious 24 Dec 2, 2022
A collection of amazing plugins made by IITC community.

IITC Community plugins A collection of amazing plugins made by community. Note: You must install IITC-CE on your desktop or mobile device to use IITC

Ingress Intel Total Conversion — Community Edition 16 Dec 29, 2022