TREB Spreadsheets
TREB is a library providing embeddable spreadsheets for any web page or web app. It's open source and available free of charge.
Comprehensive spreadsheet library
- FP functions including LAMBDA and LET
- Native support for complex numbers
- Full number and date formatting
- Automatic localization based on browser locale
- Import/export XLSX files or native JSON
Fully programmable
- Scriptable API
- Spreadsheet events
- Fully typed
Easy to use
- Works with any framework or vanilla js
- Use a custom HTML element or load from script
- Install from npm or use a CDN
Quick start
HTML using a CDN
<html lang="en">
<head>
<script type="module">
// load script from CDN
import {TREB} from 'https://unpkg.com/@trebco/treb';
</script>
</head>
<body>
<!-- add a spreadsheet to the page -->
<treb-spreadsheet></treb-spreadsheet>
</body>
</html>
Typescript using a local module
// import library (npm add @trebco/treb)
import { TREB } from '@trebco/treb';
// an html element to hold the spreadsheet
const container = document.querySelector('#spreadsheet');
// type EmbeddedSpreadsheet
const sheet = TREB.CreateSpreadsheet({
container,
// ...options...
});
Get TREB
Install with npm
npm install @trebco/treb