Chartberry.Get an API key

Chartberry for Excel and Google Sheets

Run Chartberry on the workbook you already have open. The Excel add-in puts a small task pane next to your sheet with two actions: verify the numbers, or turn the file into a dashboard. No exporting, no re-uploading. Google Sheets gets the same two calls through a short script.

What it does

Verify this workbook

Chartberry re-computes every stated total in the open file against the raw rows and shows the verdict and findings right in the pane: what reconciled, what did not, and where.

Create dashboard

Sends the open file to Chartberry, builds an interactive dashboard with the usual verification receipt, and hands you a link when it is ready.

Both actions need an API key from chartberry.io/developers. The key is stored on your machine and sent only to chartberry.io.

Install in Excel

Honest status: the add-in is sideload ready today. It is not yet listed in AppSource, so you install it with a manifest file. This takes about a minute and nothing installs beyond that file: the pane itself is served from chartberry.io/addin/taskpane.

  1. Download the manifest (manifest.xml).
  2. In Excel, open a workbook and choose Insert > Add-ins > Upload My Add-in, then pick the downloaded file. Wording varies slightly by version: on Excel for the web the upload option lives in the More Add-ins > My Add-ins dialog.
  3. On managed Windows desktops without the upload option, save manifest.xml to a network share instead, add that folder under File > Options > Trust Center > Trust Center Settings > Trusted Add-in Catalogs, restart Excel, then find Chartberry under Insert > My Add-ins > Shared Folder.
  4. Open the Chartberry pane and paste your API key from /developers.

Google Sheets (beta)

There is no Workspace add-on yet. This is a beta convenience: a short Apps Script that exports your sheet and calls the same REST API. Open your sheet, choose Extensions > Apps Script, paste the snippet, save, and reload the sheet. You get a Chartberry menu with a verify action.

// Chartberry for Google Sheets (beta). Calls the same REST API as the Excel add-in.
// 1. Open your sheet, then Extensions > Apps Script. Paste this over Code.gs and save.
// 2. In the Apps Script editor: Project Settings > Script Properties > add CB_API_KEY
//    with a key from https://chartberry.io/developers
// 3. Reload the spreadsheet. A Chartberry menu appears. The first run asks you to
//    grant access (it exports your sheet as .xlsx using your own Google session).

function onOpen() {
  SpreadsheetApp.getUi()
    .createMenu('Chartberry')
    .addItem('Verify this sheet', 'chartberryVerify')
    .addToUi();
}

function chartberryVerify() {
  var ui = SpreadsheetApp.getUi();
  var key = PropertiesService.getScriptProperties().getProperty('CB_API_KEY');
  if (!key) {
    ui.alert('Add CB_API_KEY under Project Settings > Script Properties first.');
    return;
  }

  // Export the active spreadsheet as .xlsx.
  var id = SpreadsheetApp.getActiveSpreadsheet().getId();
  var exportUrl = 'https://docs.google.com/feeds/download/spreadsheets/Export?key=' + id + '&exportFormat=xlsx';
  var xlsx = UrlFetchApp
    .fetch(exportUrl, { headers: { Authorization: 'Bearer ' + ScriptApp.getOAuthToken() } })
    .getBlob()
    .setName('workbook.xlsx');

  // Send it to Chartberry as multipart form data, field name "file".
  var res = UrlFetchApp.fetch('https://chartberry.io/api/v1/verify', {
    method: 'post',
    headers: { Authorization: 'Bearer ' + key },
    payload: { file: xlsx },
    muteHttpExceptions: true
  });
  if (res.getResponseCode() !== 200) {
    ui.alert('Chartberry error: ' + res.getContentText());
    return;
  }

  // Show the verdict and findings in a modal.
  var report = JSON.parse(res.getContentText()).report;
  var html = '<div style="font-family:sans-serif;padding:10px">' +
    '<h3 style="margin:0 0 8px">Verdict: ' + report.verdict + '</h3>';
  if (!report.findings.length) html += '<p>No findings. Every stated total reconciled.</p>';
  report.findings.forEach(function (f) {
    html += '<p style="margin:6px 0"><b>[' + f.severity + '] ' + f.title + '</b><br>' + f.detail + '</p>';
  });
  html += '</div>';
  ui.showModalDialog(HtmlService.createHtmlOutput(html).setWidth(440).setHeight(380), 'Chartberry verification');
}

The script runs under your Google account, stores your Chartberry key in script properties, and sends the exported file only to chartberry.io.

API keys

Both surfaces authenticate with a bearer key that looks like cbk_... and is sent as Authorization: Bearer on every call. Create and revoke keys any time from your developer settings.

Manage API keys

Questions or a stuck sideload? The task pane at /addin/taskpane also works as a quick smoke test: it will tell you to open it inside Excel.