JOLT docs v0.1.0 Apps Install

Your first app

This walkthrough builds the sample project in Excel, runs it, and changes it. It takes about five minutes. Word and PowerPoint work the same way.

1. Open JADE

  1. Install the JET add-in.
  2. Open a new workbook and click Home → Jolt → Run Apps to open JET.
  3. In JET, choose ☰ → Build or edit apps (JADE). The first time, JADE takes a moment to download.
  4. JADE opens and says No JOLT project in this document. Click Build sample project.

The file tree now shows four files:

jolt.json     the project's settings
index.html    the app's page
styles.css    its styles
main.js       its code

2. Run a function

Open main.js. It exports two functions:

/** @automation Write timestamp — Write the current date and time into the document. */
export async function writeTimestamp(context) {
  const range = context.workbook.getSelectedRange();
  range.values = [[new Date().toLocaleString()]];
  range.format.autofitColumns();
  await context.sync();
}

/** Runs when the app starts (see "autoRun" in jolt.json). */
export function autoRun() {
  jolt.$("#stamp")?.addEventListener("click", () =>
    jolt.run(writeTimestamp).then(() => jolt.notify("Done", "success"), (e) => jolt.notify(String(e), "error")),
  );
}
  1. Select a cell in the sheet.
  2. In the toolbar's function picker, choose ★ writeTimestamp(context). The ★ marks an automation.
  3. Click ▶ Run, or press Ctrl+Enter.

writeTimestamp takes one parameter, so JOLT runs it inside Excel.run and passes the request context. The selected cell now holds the time.

3. Preview the app

Choose ☰ → Project → Preview in JET. JADE saves the project and JET starts the app in its tab for this workbook, exactly as users will see it. JOLT renders index.html and calls autoRun, which wires up the button. Click Write a timestamp, then click JADE in JET's tab bar to go back to the editor.

4. Change it

Add a second automation to main.js:

/** @automation Bold selection — Make the selected cells bold. */
export async function boldSelection(context) {
  context.workbook.getSelectedRange().format.font.bold = true;
  await context.sync();
  jolt.print("Bolded the selection");
}

It appears in the function picker right away. Run it, then open the Output drawer to see the jolt.print message.

5. Save

JADE autosaves the project into the document as you type, and you can press Ctrl+S to save straight away. The project is only kept for good when you save the workbook in Excel.

Now anyone who opens the workbook with JET installed can click Run Apps to use the app.

Next steps

  • JADE: everything the editor can do.
  • The jolt API: dialogs, storage, files and more.
  • Libraries: use VanJS, React (through htm) or any package from esm.sh.
  • Example apps: Data Cleanup, Workbook Map and Formula Audit are small, complete apps whose code you can copy into JADE and change.
  • JAM: publish your app so anyone can install it.