TX Sheet Control

Install the npm Packages

Topic

The two npm packages of TX Sheet Control, the editor @txtextcontrol/tx-sheet-control and the Node.js server @txtextcontrol/tx-sheet-control-server, are not published on the npm registry. They come as archives in the npm folder of the download, and you install them from these files with the normal npm install command.

ArchivePackageUse it for
txtextcontrol-tx-sheet-control-2.0.0.tgz@txtextcontrol/tx-sheet-controlThe editor in JavaScript, TypeScript and Angular applications
txtextcontrol-tx-sheet-control-server-2.0.0.tgz@txtextcontrol/tx-sheet-control-serverDocument processing in Node.js 22 or newer

A command such as npm install @txtextcontrol/tx-sheet-control@2.0.0 fails with a 404 error, because npm looks for the package on the public registry.

Add the Archive to Your Project

npm records the path of the archive in package.json, and every later npm install or npm ci needs the archive at that path. Keep it in the project, so that it travels with your source code to other developers and build servers:

  1. Create a folder for it in your project, for example vendor.

  2. Copy the archive from the npm folder of the download into it.

  3. Install it from there, in the folder of your package.json:

    npm install ./vendor/txtextcontrol-tx-sheet-control-2.0.0.tgz
    

npm adds the package under its name, with the archive as its source:

"dependencies": {
    "@txtextcontrol/tx-sheet-control": "file:vendor/txtextcontrol-tx-sheet-control-2.0.0.tgz"
}

Commit the archive with package.json and package-lock.json. If your repository is public, keep the archive on an internal server or in a private registry of your company instead, because it is licensed software.

You import the package by its name, as in any other project:

import { Spreadsheet, StreamType } from '@txtextcontrol/tx-sheet-control';

The Editor Package

The editor package has no dependencies. It includes the editor, its type declarations for TypeScript, fonts, language files and the Angular integration.

The editor loads its fonts at run time. Serve the package's dist/fonts folder as static files, for example from node_modules/@txtextcontrol/tx-sheet-control/dist/fonts, and set the fontCatalogURL option to the URL of its catalog.json. Static Assets and Font Handling describe the details.

Angular

The Angular component is part of the editor package. Install the archive of the editor package into your Angular 22 application, as described above, and import the standalone component from the angular entry point:

import { TXSheetControlComponent } from '@txtextcontrol/tx-sheet-control/angular';

@angular/core and @angular/common 22.x are optional peer dependencies of the package: they are already part of an Angular application and are not installed for plain JavaScript applications. The Angular tutorial builds a first application.

The Node.js Server Package

Install the server archive into a Node.js 22 or newer project:

npm install ./vendor/txtextcontrol-tx-sheet-control-server-2.0.0.tgz

The package has no dependencies and does not need the editor package or a browser. It brings its fonts and runtime files in its dist folder: keep them together when you deploy the application. On an older Node.js version, npm warns with EBADENGINE. The Node.js processing tutorial builds a first application.

Update to a New Release

Copy the archive of the new release into the vendor folder, install it with npm install as above and delete the archive of the previous release. npm updates the path in package.json.

Next Steps