@aivopod/sheets (1.0.0)

Published 2026-11-10 15:13:43 +01:00 by oliver.maklott in aivopod-shared/sheets

Installation

@aivopod:registry=
npm install @aivopod/sheets@1.0.0
"@aivopod/sheets": "1.0.0"

About this package

@aivopod/sheets

Reads Excel workbooks (.xlsx) and CSV files in the browser, for Aivopod packs that check work students did in a spreadsheet program. Plan 26 of Aivopod (docs/PLAN-26.md in aivopod-app, Teil AZ of its docs/SPEC.md).

Part What
browser/ classic scripts on window.AivopodSheets, no build: xml, zip, formula, xlsx, csv. They run as they are back to Safari 15.4.
app/ the table bridge: a pack app that reads the file a student picks and answers what a step asks for (settings.cells); it loads the scripts from vendor/
fixtures/ lerndaten/: the workbooks of Meine-Lerndaten 1.4.1 (made by scripts/lerndaten-fixtures.py, openpyxl); reader/: scripts/build-fixtures.py

The reader came from the Excel bridge of the pack Meine-Lerndaten (1.4.1). test/legacy/ holds that reader; a test reads every workbook of the pack with both and requires the library to return everything the old reader did, with the same values.

Packs take the library through aivopod.vendor in their package.json; aivopod pack build copies the parts into the pack (Teil AZ, D516).

Findings per cell

A step asks with settings.cells: ranges and the fields wanted, at most 400 cells. The answer has only those fields, and only where they differ from the default. It always fits the platform's limit (15 500 characters): when it would not, texts and formulas get shorter, then cells at the end are left out, and trimmed says so. Fields and the answer's shape: browser/cells.js, test/schema.mjs.

Checker core

@aivopod/sheets/check (TypeScript, no runtime dependencies) goes into a pack's checker: answerOf(answer, { accept, template, calculated }) gives the answer or a basis error with a fixed ID (sheets.keine-datei, sheets.nur-csv, sheets.nur-xlsx, sheets.makro-datei, sheets.falsches-format, sheets.falsche-vorlage, sheets.nicht-berechnet, sheets.blatt-fehlt); the pack has texts for them under feedback.sheets.*. The template counts by <pack>/<file>, not by its version. Helpers say facts about cells (samePattern, constantsIn, allBorders, merged, near, …); the verdict and its feedback are the pack's.

Vendoring into a pack

aivopod-vendor.json (written by npm run build) names what a pack may copy and the SHA-256 of each file: the browser scripts in load order, the app tabellen-bruecke (scripts go into its vendor/) and the checker core. A pack names the package under aivopod.vendor in its package.json; aivopod pack build copies the files and refuses changed ones (D516).

Develop

npm install
npm run check              # prettier and the tests (node --test)
python3 scripts/build-fixtures.py   # rebuild fixtures/reader (Python 3, no libraries)

A new version in package.json on main is published by CI to the npm registry of the aivopod organisation (scripts/publish.sh, secret PACKAGE_TOKEN).

License

FSL-1.1-ALv2, see LICENSE.md.

Dependencies

Development dependencies

ID Version
@aivopod/analysis 0.68.0
prettier ^3.9.10
typescript ~6.0.3
valibot ^1.5.0
Details
npm
2026-11-10 15:13:43 +01:00
3
FSL-1.1-ALv2
31 KiB
Assets (1)
Versions (3) View all
1.2.0 2026-11-28
1.1.0 2026-11-23
1.0.0 2026-11-10