Skip to main content

Excel Task Pane Guide

The Konsolidat task pane is the Office.js add-in's sidebar in Excel. It has four panels: Sign in, Reports, Instructions & testing and Messages. Signing in here also signs in the K. worksheet functions (see Excel Custom Functions).

Source of truth: konsol/public/excel-addin/index.html (the pane), konsol/konsol/excel_addin_manifest.template.xml (how Excel loads it, rendered per site by konsol/konsol/excel_addin.py), konsol/konsol/excel_addin_auth.py and excel_addin_cookies.py (sign-in), and the excel_addin_*, build_cell_map, build_snapshot and list_report_templates methods in konsol/konsol/api.py, and ribbon.js (the ribbon's refresh buttons). This page follows those files as they are on 2026-11-07.

The pane does not start or monitor data pipelines. Earlier versions of this page described pipeline controls that the pane no longer has.

Installation​

Each site serves its own manifest (konsol#605). Download the manifest from your site: in Desk, Close Settings → Excel Add-in → Download Excel add-in, or open https://<your site>/api/method/konsol.excel_addin.manifest. The file is konsolidat-<site>.xml, and every address in it is your site's, built from the site's host_name. A site without an https host_name refuses the download with a page that says so; a System Manager sets it with bench --site <site> set-config host_name https://<public address>. konsol no longer ships a static manifest.xml.

If you installed the add-in from an older static manifest.xml, remove that add-in in Excel and install the downloaded file. Do the same when a konsol release raises the manifest version.

What the manifest declares​

PropertyValue
IdDerived from the site's address: stable for one site, different between sites
Display nameKonsolidat (<site host>)
Version2.0.6.0. The pane shows the same version, followed by the time the server's functions.js was deployed: v2.0.6.0 · deployed <YYYY-MM-DD HH:MM> UTC
TypeTaskPaneApp, host Workbook
RequirementSharedRuntime 1.1 (one runtime for pane and functions)
Sourcehttps://<your site>/assets/konsol/excel-addin/index.html
Function metadatahttps://<your site>/assets/konsol/excel-addin/functions.json
NamespaceK
PermissionReadWriteDocument
RibbonHome tab, group Konsolidat, buttons Konsolidat ("Open Konsolidat (required once before =K.EPM formulas work)"), Refresh sheet and Refresh workbook (see Ribbon)

Excel on the web (production)​

Register the manifest in the Microsoft 365 Admin Center as a custom add-in: upload the downloaded file, or give the link https://<your site>/api/method/konsol.excel_addin.manifest. Sideloading is not reliable on Excel on the web; the admin-center route is the one the add-in was verified with.

The server must send Access-Control-Allow-Origin on /assets/konsol/excel-addin/* and allow framing (Content-Security-Policy: frame-ancestors): Excel on the web fetches functions.json from *.office.com. Without the CORS header, K. names do not register and cells show #NAME? while the pane itself still loads.

Excel for Windows and Mac (development)​

  1. Download the manifest from your site, as above.
  2. In Excel: Insert → My Add-ins → Upload My Add-in, choose the file.
  3. The Konsolidat button appears on the Home tab. Click it to open the pane.

Reading another site​

The pane's Server panel shows the site the workbook reads. By default it is the site the add-in was installed from. To read another site with the same install, enter that site's address (https, the address only) and choose Use this server. The choice is kept in the workbook and saved with the file, so two open workbooks can read two sites. The other site must list this add-in's site in its Close Settings → Excel Add-in Origins; only a System Manager can change that list. The add-in keeps one sign-in per site and never sends one site's token to another.

Opening the pane​

The header shows Konsolidat, the version, and "Connecting to Excel…" until Office.js reports ready (the pane starts anyway after 5 seconds). Then:

  1. The pane asks the server who you are (konsol.api.excel_addin_whoami). If a token or cookie session is valid, it opens signed in.
  2. One second later it probes the functions: it writes =K.PING() into cell ZZ999 of the active sheet, reads the result, and clears the cell. 1 means Excel registered the K. names; #NAME? means it did not.
  3. The result goes to the Messages panel and the diag: line (see below).

Sign in​

The Sign in panel is open by default. It shows "Required for =K.EPM() and reports.", an Email field (placeholder Administrator), a Password field and a Log In button. Enter in the password field also submits.

What happens: the pane posts {usr, pwd} to konsol.api.excel_addin_auth. The server authenticates with Frappe's LoginManager and returns {token, user}. The pane stores the token in localStorage under konsol_token:<site origin>, one per site. The panel title becomes Signed in as <user>, the body shows "Session active for =K.EPM() and Apply report." and a Log out link, and the Reports panel appears.

Every later request from the pane and from the K. functions sends the token in the X-Konsolidat-Token header. On the server, apply_excel_token_auth (a before_request hook) signs the request in as the token's user. The token lives in the Frappe cache for 8 hours (_TOKEN_TTL in excel_addin_auth.py); after that you sign in again.

Cookies: the pane sends its sign-in and whoami requests without cookies (credentials: "omit"), because Excel on the web runs the pane in an iframe where third-party cookies are often blocked. The server still prepares its cookies for that case: excel_addin_cookies.py forces SameSite=None; Secure on every cookie set under /api/ and adds the Partitioned attribute (Chrome requires it for cookies in embedded iframes). If a cookie session does exist, excel_addin_whoami accepts it.

Messages you can see in the panel:

TextMeaning
Email and password are required.A field was empty
HTTP <status> or the server's exception textWrong credentials or the server refused the login
Login response missing tokenThe server answered 200 without a token (misconfigured server)

Log out​

Log out removes the token from localStorage, posts it to konsol.api.excel_addin_logout (which revokes it on the server), returns the panel to Sign in, hides Reports, and logs "Signed out."

Reports​

The Reports panel appears after sign-in. Its fields:

FieldValues
TemplateMonthly P&L (live formulas) (pnl_monthly) or Trial balance — long (snapshot) (trial_balance_long)
EntityEntity code
YearDefault 2024, range 2000–2100
Period from / Period to1–12, default 1–12. Shown only for the trial balance
Apply report buttonShown for Monthly P&L
Snapshot values buttonShown for the trial balance

The hint line changes with the template: "Apply paints live =K.EPM() formulas that recalc when data changes." or "Snapshot loads trial balance values once — build other sheets with normal Excel formulas."

The template list is written into index.html. The server also offers the same catalogue through konsol.api.list_report_templates (list_templates in konsol/report_compiler.py: pnl_monthly, mode formulas; trial_balance_long, mode snapshot), but the pane does not call it. Adding a template means changing both.

Apply report (Monthly P&L)​

  1. The pane posts {template_id, entity, year, scenario_id: "actuals"} to konsol.api.build_cell_map.
  2. The server checks you may read the entity, collects the Published, non-group Main Accounts with statement section Profit and Loss from the group chart, and compiles a cell map: ranges and the =K.EPM() formulas to put in them, with sheet_name "P&L". If Published P&L accounts exist in more than one chart, it refuses: "The monthly P&L reads one chart ... Make one chart Inactive or Draft."
  3. The pane creates the sheet P&L if it is missing, activates it, clears its used range (so a shorter layout leaves no old rows), and writes the formulas. Excel then calculates them through the K. functions.

Messages, in order: Apply report: building pnl_monthly for <entity> <year>…, Painting <n> ranges on sheet "P&L"…, Apply report done — =K.EPM() formulas on sheet "P&L". Errors: Apply report: entity and year are required., Apply report supports Monthly P&L only — use Snapshot for trial balance., or the server's message.

Snapshot values (trial balance)​

  1. The pane posts {template_id, entity, year, period_from, period_to} to konsol.api.build_snapshot.
  2. The server reads gold_trial_balance for that entity, year and period range: one row per account × period with debit, credit and net, at most 10,000 rows (TB_LONG_MAX_ROWS). It returns values, not formulas, with sheet_name "TB" and a row_count.
  3. The pane creates or clears the sheet TB and writes the values. They do not recalculate; build your own sheets with normal Excel formulas that reference TB.
  4. The pane saves the snapshot's parameters in the workbook, so Refresh sheet and Refresh workbook on the ribbon can take the snapshot again (see Snapshot parameters).

Messages: Snapshot: loading TB for <entity> <year> P<from>–<to>…, Painting <n> rows on sheet "TB"…, Snapshot done — values on sheet "TB". Build other sheets with Excel formulas referencing TB. Errors: Snapshot: entity and year are required., Snapshot supports Trial balance — long only., Snapshot: period from/to must be 1–12 and from ≤ to., or the server's message (Snapshot not supported for template ..., period_from and period_to must be between 1 and 12).

For scripts, the pane exposes window.konsolidatApplyReport({template_id, entity, year}) and window.konsolidatSnapshotReport({template_id, entity, year, period_from, period_to}).

Ribbon: Refresh sheet and Refresh workbook​

Shipped in konsol PR #405, manifest 2.0.2.0. The add-in's group on the Home ribbon has three buttons: Konsolidat (opens the pane), Refresh sheet and Refresh workbook. The two refresh buttons run ribbon.js in the shared runtime (manifest ExecuteFunction, Office.actions.associate).

Refresh sheet acts on the active sheet:

  1. If the sheet is a snapshot sheet, the add-in takes the snapshot again with its saved parameters (template, entity, year, period from and to).
  2. The sheet recalculates with worksheet.calculate(true), so every =K.* formula on it runs again (ExcelApi 1.6; every Excel with the shared runtime the manifest requires has it).
  3. The sheet gets the stamp (below).

Refresh workbook takes every saved snapshot again, one at a time. Then it recalculates the whole workbook with application.calculate(full) and stamps every sheet that has a =K.* formula or a snapshot. Each sheet is read and stamped on its own, so one large or protected sheet does not stop the rest. Messages lists any sheet that was not stamped and why. At the end, the sheet that was active before is active again.

One refresh runs at a time. A second click while one runs, or while the pane's Snapshot runs, is refused with a message. A snapshot that does not finish in 2 minutes fails, and a whole refresh stops after 10 minutes, so the button never stays greyed.

The stamp​

Each refreshed sheet shows Values as of <YYYY-MM-DD HH:MM> UTC from <site host> in row 1, naming the site the values came from:

  • in the row-1 cell that already holds a stamp, if there is one. The text must match exactly, so a note such as "Values as of last Friday" is left alone;
  • else in the first empty cell to the right of row 1's last used cell.

On the shipped templates that is G1 on the Monthly P&L (row 1 ends at F1) and J1 on the trial balance snapshot (row 1 ends at I1). The stamp never overwrites a cell that holds something else. A sheet with no =K.* formula and no snapshot is recalculated but not stamped.

The stamp records when the refresh asked for the values. =K.* formulas are asynchronous: a cell can still show #BUSY! for a moment after the stamp is written.

Snapshot parameters​

When the pane's Snapshot values button paints a sheet, the add-in saves the snapshot's parameters in the workbook (Office.context.document.settings, key konsolSnapshots, keyed by sheet name). They are saved with the workbook, so they survive save and reopen. A renamed snapshot sheet is no longer a snapshot sheet: take the snapshot again from the pane. If the sheet was deleted, Refresh workbook forgets its snapshot and does not create the sheet again.

Feedback​

A ribbon command has no window of its own. The result goes to the pane's Messages log, for example Refreshed sheet P&L: 756 formulas. Values as of 2026-11-07 09:30 UTC from site.example (in G1). Excel has no non-blocking notification for add-ins, so on a failure the add-in opens the pane, where Messages shows why. It never shows a blocking dialog.

If you are not signed in, or the sign-in expired, nothing is recalculated, snapshotted or stamped: the pane opens and Messages says to sign in. If the server cannot be reached to check the sign-in, Messages says so instead, and nothing is refreshed. The diag: line shows ribbon=yes when the buttons are bound.

Verification status​

The konsol tests run ribbon.js under node with stub Office and Excel objects. As of 2026-11-07 these points are still to be checked in Excel on the web: the two buttons appear in the Home-tab group and run without opening the pane first; each button is enabled again after its run; the snapshot parameters survive closing and reopening the workbook; and range.formulas reports a custom function as =K.EPM(...), so the formula count and the stamp find it.

Instructions & testing​

A collapsed panel with the smoke test (=K.PING() → 1), a sample =K.EPM("<entity>", <year>, <period>, "<account>"), the five steps for a report, and the diag: line:

diag: associate=yes · ribbon=yes · names=yes(=1) · token=stored · session=Administrator
FieldValuesMeaning
associateyes / nofunctions.js registered its handlers with Office.js
ribbonyes / noribbon.js bound the Refresh sheet and Refresh workbook buttons
namespending, yes(=1), no(#NAME?), excel-api-unavailable, probe-failedResult of the ZZ999 probe
tokenstored / none / blockedA token is in localStorage / none / the browser blocks localStorage
session…, a user name, none, errorWhat excel_addin_whoami answered

Messages​

A collapsed panel with a Clear button and a log. Each line is [hh:mm:ss] text, coloured as info, ok or error. The badge on the panel title counts lines once an error has been logged, and an error opens the panel. Empty, it reads "No messages yet."

After the probe, after sign-in and after log-out the pane writes a status block:

LineMeaning
associate=yes — custom-functions runtime loaded (=K.* handlers registered).Good
associate=no — functions.js did not register; reload workbook or redeploy add-in.functions.js did not load in this runtime
names=yes — Excel registered K.* (ZZ999 =K.PING() returned 1).Good
names=no — =K.PING() in ZZ999 returned #NAME? (metadata/CORS issue on Excel web).Excel could not fetch or accept functions.json. A second line says the probe can be unreliable and suggests =K.PING() in a normal cell
names=skipped — Excel API unavailable in this host.Not running inside Excel
names=failed — could not write or read probe cell.The probe write to ZZ999 failed (for example a protected sheet)
token=stored — =K.EPM() will send X-Konsolidat-Token to the API.Good
token=none — sign in so =K.EPM() can fetch data.Not signed in
token=blocked — browser blocked localStorage; sign-in may not persist.Storage blocked in the iframe
session=<user> — signed in for Apply report and API calls.Good
session=none — not signed in; Apply report needs login.Not signed in
session=error — whoami request failed.The server is unreachable or refused the request

API methods the pane uses​

MethodEndpointPurpose
POSTkonsol.api.excel_addin_authSign in; returns {token, user}
GETkonsol.api.excel_addin_whoamiWho the token or cookie belongs to
POSTkonsol.api.excel_addin_logoutRevoke the token
POSTkonsol.api.build_cell_mapCompile the Monthly P&L formulas
POSTkonsol.api.build_snapshotFetch trial balance values
GETkonsol.api.list_report_templatesTemplate catalogue (available; the pane does not call it)

The K. functions call konsol.api.epm_batch and konsol.api.budget_cell_save; see Excel Custom Functions.

Troubleshooting​

SymptomCauseFix
The pane is blank or stays on "Connecting to Excel…"The manifest URLs do not reach a running Frappe server, or Office.js did not loadCheck the URLs in the manifest; open https://<server>/assets/konsol/excel-addin/index.html in a browser
Cells show #NAME?, Messages say names=noExcel on the web could not fetch functions.json cross-originServe /assets/konsol/excel-addin/* with Access-Control-Allow-Origin; deploy through the Microsoft 365 Admin Center
Messages say associate=nofunctions.js did not run in the shared runtimeReload the workbook; redeploy the add-in
token=blockedThe browser blocks localStorage in the Excel iframeAllow storage for office.com and your server, or use desktop Excel
Not logged in in cells after a whileThe token expired (8 hours)Sign in again
Apply report supports Monthly P&L onlyTrial balance selected with ApplyUse Snapshot values
"The monthly P&L reads one chart"Published P&L accounts in several chartsSet the other charts Inactive or Draft in Frappe
The Konsolidat button is missingManifest not loadedUpload the manifest again, or check the admin-center deployment
Refresh sheet / Refresh workbook are missing, or diag: shows ribbon=noExcel still has a manifest older than 2.0.2.0, or ribbon.js did not loadUpdate the manifest in the admin center; reload the workbook
A refreshed sheet has no stampRow 1 has no free cell to the right of its last used cell, the sheet is protected, its snapshot failed, or it has no =K.* formula and no snapshotRead the reason in Messages

Next steps​