Skip to main content

License Key

Setting the License Key.

tip

No license key is needed during evaluation. License keys are only needed for development of an application intended for production.

License keys can be generated by visiting my.sheetxl.com.

A key can be supplied in any of these ways. Pick the one that fits where your code runs.

In code​

Add the following line before using the API or rendering a component. It works in the browser and in Node.

import { LicenseManager } from '@sheetxl/sdk';

await LicenseManager.setLicenseKey('visit https://my.sheetxl.com after trial.');

The Studio component also accepts a licenseKey prop, and the vanilla embed script a data-license-key attribute.

In the browser: a sheetxl.lic file​

Create a file named sheetxl.lic containing the key on a single line, and serve it from the root of your deployed application. SheetXL looks for it at or above the page's path. Lines starting with # are ignored.

In Node and the CLI​

Either of these is picked up automatically, with no code change:

  1. Set the SHEETXL_LICENSE_KEY environment variable. This is the right choice for CI and servers.
  2. Run npx sheetxl license activate YOUR_KEY once. The key is stored in your user profile and used by every later run on that machine. Omit the key to sign in through your browser instead.
info

We understand that the license key may be visible to others; this is expected and ok as keys do not contain any personally identifiable information.