Jspreadsheet is a lightweight, vanilla javascript plugin to create amazing web-based interactive data grids with spreadsheet like controls compatible with Excel, Google Spreadsheets and any other spreadsheet software.
npm install jspreadsheet-cenpm install jspreadsheet-ce
html
`
$3
A basic example to integrate the Jspreadsheet in your website to create your first data grid with spreadsheet controls.
#### Usage
Add jexcel/jspreadsheet and Jsuites to your html file
`html
`
You should initialize your data grid on a div container, such as:
`html
`
To initialize a Jspreadsheet CE table you should run JavaScript, such as:
`javascript
jspreadsheet(document.getElementById('spreadsheet'), {
worksheets: [{
data: [
['Jazz', 'Honda', '2019-02-12', '', true, '$ 2.000,00', '#777700'],
['Civic', 'Honda', '2018-07-11', '', true, '$ 4.000,01', '#007777'],
],
columns: [
{ type: 'text', title:'Car', width:120 },
{ type: 'dropdown', title:'Make', width:200, source:[ "Alfa Romeo", "Audi", "Bmw", "Honda" ] },
{ 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
$3
% npm run build
$3
% npm run start
Data Grid Examples
- https://bossanova.uk/jspreadsheet/docs/examples/create-from-table
- https://bossanova.uk/jspreadsheet/docs/examples/translations
- https://bossanova.uk/jspreadsheet/docs/examples/table-overflow
- https://bossanova.uk/jspreadsheet/docs/examples/richtext-html-editor
- https://bossanova.uk/jspreadsheet/docs/examples/column-dragging
- https://bossanova.uk/jspreadsheet/docs/examples/web-component
- https://bossanova.uk/jspreadsheet/docs/examples/jquery
Jspreadsheet Changelog
$3
- Separation of spreadsheet and worksheets;
- New worksheet methods and events;
- Dedicated wrappers for React and Vue for better framework integration;
- Modern development environment powered by Webpack;
- Updated architecture aligned with other distributions;
More information
$3
- Jexcel renamed to Jspreadsheet.
- Integration with Jsuites v4.
$3
- The spreadsheet plugin is now compatible with Jsuites v3.
- New flags and security implementations.
- New DOM element references in the toolbar.
- Worksheet events are now tabbed.
$3
Special thanks to FDL - Fonds de Dotation du Libre for their support and sponsorship, which made the new version possible with many exciting features.
- Workbook/tab support for spreadsheets.
- Create dynamic spreadsheets from static HTML elements.
- Highlight selected cells in the spreadsheet after CTRL+C.
- Footer with formula support.
- Multiple column resizing.
- JSON update support (helpers to update a remote server).
- Centralized event dispatch method for all spreadsheet events.
- Custom helpers: =PROGRESS (progress bar), =RATING (5-star rating).
- Custom formula helpers: =COLUMN, =ROW, =CELL, =TABLE, =VALUE.
- Dynamic nested header updates.
- New HTML editing column type.
- New flags: includeHeadersOnCopy, persistence, filters, autoCasting, freezeColumns.
- New events: onevent, onchangepage, onbeforesave, onsave.
- More examples and documentation.
$3
- New methods.
- General fixes.
$3
- Improved spreadsheet formula parsing.
- New spreadsheet events.
- New initialization options.
- General fixes.
$3
- getMeta, setMeta methods.
- NPM package with jSuites.
- General fixes.
$3
Jspreadsheet v3 is a complete rebuild of the JavaScript spreadsheet (previously a jQuery plugin). Due to the changes, full compatibility could not be ensured. If upgrading, your code may require some updates. For more information, refer to the article on upgrading from Jspreadsheet v2 or Handsontable.
New features in Jspreadsheet v3:
- Drag and drop columns.
- Resizable rows.
- Merge columns.
- Search functionality.
- Pagination.
- Lazy loading.
- Full-screen mode.
- Image upload.
- Native color picker.
- Better mobile compatibility.
- Enhanced nested headers support.
- Advanced keyboard navigation.
- Better hidden column management.
- Data picker enhancements: dropdown, autocomplete, multiple selection, group options, and icons.
- Import from XLSX (experimental).
Major improvements:
- A new formula engine with faster results and no external dependencies.
- No use of selectors, leading to faster performance.
- New native column types.
- No jQuery required.
- Examples for React, Vue, and Angular.
- XLSX support via a custom SheetJS integration (experimental).
$3
- Mobile touch improvements.
- Paste fixes and a new CSV parser.
$3
- New radio column type.
- New dropdown with autocomplete and multiple selection options.
- Header/body separation for better scroll and column resize behavior.
- Text-wrap improvements, including Excel-compatible alt+enter.
- New set/get meta information.
- New set/get configuration parameters.
- Programmatic set/get cell styles.
- set/get cell comments.
- Custom toolbar for tables.
- Responsive calendar picker.
$3
- Improvements to checkbox column type.
- Updates to table destruction in jQuery.
$3
- Spreadsheet data overflow and fixed headers. See an example.
- Navigation improvements.
$3
- Relative insertRow, deleteRow, insertColumn, deleteColumn. See an example.
- Redo and undo support for insertRow, deleteRow, insertColumn, deleteColumn, moveRow.
- New formula column recursive chain.
- New alternative design option (Bootstrap-like). See an example.
- updateSettings` improvements.