dash-univer
A Dash component that embeds the Univer spreadsheet — a full-featured, Excel-like sheet with formulas — directly in your Dash app, wired to Dash callbacks.
pip install dash-univer
Quick start
from dash import Dash, html, Input, Output
from dash_univer import UniverSheet
app = Dash(__name__)
app.layout = html.Div([
UniverSheet(id="sheet", data={
"id": "wb",
"name": "My Workbook",
"sheetOrder": ["s1"],
"sheets": {
"s1": {
"id": "s1",
"name": "Sheet1",
"cellData": {
"0": {"0": {"v": "Product"}, "1": {"v": "Revenue"}},
"1": {"0": {"v": "Widget"}, "1": {"v": 1000}},
},
},
},
}),
html.Pre(id="out"),
])
@app.callback(Output("out", "children"), Input("sheet", "data"))
def show(data):
return f"{len(data.get('sheets', {}))} sheet(s) in the workbook"
if __name__ == "__main__":
app.run(debug=True)
Run python usage.py in this repo for a fuller live demo.
How it works
UniverSheet mounts a Univer spreadsheet into a <div>. Univer runs in its own
isolated React root inside that div, so it never conflicts with Dash's React tree.
The data prop is the whole workbook (Univer's
IWorkbookData
as a plain dict) and syncs both ways:
- Sheet → Python: as the user edits, a debounced full snapshot of the
workbook is pushed to
data, so any callback withInput("sheet", "data")sees the current state. - Python → Sheet: returning a workbook from a callback's
Output("sheet", "data")re-renders the sheet. The component guards against echoing its own snapshots, so this never causes a feedback loop.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
id |
string | – | Component id for Dash callbacks. |
data |
dict | {} |
The workbook (IWorkbookData). Round-trips both ways. |
debounce |
number | 300 |
Milliseconds to debounce edit → data updates. |
style |
dict | {height: "500px", width: "100%"} |
Container styles. Give it a height — Univer collapses to zero height otherwise. |
className |
string | – | Container CSS class. |
Advanced: the live Univer
Facade API is
exposed as document.getElementById(id).univerAPI for client-side callbacks or
custom JS.
Development
Requires Python ≥3.9, Node ≥18, and Chrome (for the tests).
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
npm install
npm run build # webpack bundle + generates the Python classes
python usage.py # live demo at http://127.0.0.1:8050
pytest --headless # end-to-end tests (real browser)
npm run build runs webpack (bundling Univer, with React/ReactDOM externalized
to the ones Dash provides) and then dash-generate-components, which regenerates
dash_univer/UniverSheet.py from the component's PropTypes.
The tests use dash.testing with Selenium; they need a chromedriver matching
your installed Chrome on PATH (see
Chrome for Testing).
Scope
v1 wraps Univer Sheets (@univerjs/preset-sheets-core) in English. Docs,
Slides, other locales, and granular per-cell events are intentionally out of
scope for now — the full-snapshot data contract already exposes everything.
License
Metadata
Release files for dash-univer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dash_univer-0.1.1.tar.gz | 2.6 MB | With provenance | Details for dash_univer-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dash_univer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dash_univer-0.1.1-py3-none-any.whl |
Total release size: 5.2 MB
Release files / dash_univer-0.1.1.tar.gz
| Download URL | dash_univer-0.1.1.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c66cc0e6408686f8893d6cef54c6ec00347ac4b0f1a64bd96edc5628188ee77
|
|
BLAKE2b-256 checksum How to use checksums |
d881b2ec3c970ac333acd8d37ca9ea0b9f052513825215f3a067825e543516ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logRelease files / dash_univer-0.1.1-py3-none-any.whl
| Download URL | dash_univer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73904e55a069a6347f165301a154de196d351be76761629d98b51dd8ce2a9ce7
|
|
BLAKE2b-256 checksum How to use checksums |
5f30397056c18812281cfd3ab869928814f4a79b312de245c2ef1bb292cda9ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logSecurity for dash-univer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dash_univer-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.