FREE TOOL · JIRA DATA
Jira to Excel, Power BI or Google Sheets, without a connector
Type your site and a JQL query, pick the columns, and copy the code. It reads every page of the search, refreshes, and holds no password or token.
Excel and Power BI
- Create an API token in your Atlassian account. It lasts up to a year.
- Excel: Data > Get Data > From Other Sources > Blank Query. Power BI: Get data > Blank query. Open the Advanced Editor and paste the code over what is there.
- When asked for credentials choose Basic: user name = your Atlassian e-mail, password = the API token. Set the level to your Jira site.
- Close & Load. Later, Refresh All.
// Jira work items for Excel (Data > Get Data > Blank Query > Advanced Editor) and Power BI.
// Sign in with Basic: user name = your Atlassian e-mail, password = an API token. Nothing secret is in this text.
// Made with https://simplify-software.org/tools/jira-excel-power-query
let
Site = "https://your-site.atlassian.net",
JQL = "project = WEB AND created >= -90d ORDER BY created DESC",
Fields = "summary,issuetype,status,priority,assignee,created,updated,resolutiondate,duedate",
GetJson = (path as text, query as record) =>
Json.Document(Web.Contents(Site, [RelativePath = path, Query = query, Headers = [Accept = "application/json"]])),
// With a wrong token the search answers "200, no work items", so ask who is signed in first
SignedIn = Record.FieldOrDefault(GetJson("rest/api/3/filter/defaultShareScope", []), "scope", null) <> null,
// Jira gives 100 work items a page, and a token for the next page
GetPage = (token as nullable text) =>
GetJson(
"rest/api/3/search/jql",
[jql = JQL, fields = Fields, maxResults = "100"] & (if token = null then [] else [nextPageToken = token])
),
NextToken = (page as record) =>
if Record.FieldOrDefault(page, "isLast", true) then null else Record.FieldOrDefault(page, "nextPageToken", null),
Pages = List.Generate(
() => GetPage(null),
(page) => page <> null,
(page) => if NextToken(page) = null then null else GetPage(NextToken(page))
),
Issues =
if SignedIn then List.Combine(List.Transform(Pages, (page) => page[issues]))
else error Error.Record("Jira sign-in", "Jira did not accept the e-mail and API token.", Site),
Get = (v, name as text) => if v is record then Record.FieldOrDefault(v, name, null) else null,
Plain = (v) => if v = null or v is text then v else if v is record then Rich(v) else if v is list then Many(v) else Text.From(v),
Option = (v) => if Get(v, "child") = null then Get(v, "value") else Get(v, "value") & " / " & Get(Get(v, "child"), "value"),
One = (v) => if v is record then List.First(List.RemoveNulls({Get(v, "displayName"), Get(v, "name"), Get(v, "value"), Get(v, "key")}), null) else if v = null then null else Text.From(v),
Many = (v) => if v is list then Text.Combine(List.RemoveNulls(List.Transform(v, One)), "; ") else One(v),
Num = (v) => if v is text then (try Number.FromText(v, "en-US") otherwise null) else if v is number then v else null,
When = (v) => if v is text and Text.Length(v) > 20 then DateTimeZone.FromText(Text.Insert(v, Text.Length(v) - 2, ":")) else null,
Day = (v) => if v is text and Text.Length(v) >= 10 then Date.FromText(Text.Start(v, 10)) else null,
Hours = (v) => if v is number then v / 3600 else null,
Rich = (v) =>
if v = null or v is text then v
else if Get(v, "type") = "hardBreak" then "#(lf)"
else if Get(v, "text") <> null then Get(v, "text")
else if Get(v, "content") <> null then
Text.Combine(
List.Transform(Get(v, "content"), @Rich),
if List.Contains({"doc", "bulletList", "orderedList", "listItem", "blockquote", "table", "tableRow"}, Get(v, "type")) then "#(lf)" else ""
)
else if Get(Get(v, "attrs"), "text") <> null then Get(Get(v, "attrs"), "text")
else if Get(Get(v, "attrs"), "url") <> null then Get(Get(v, "attrs"), "url")
else "",
Rows = List.Transform(
Issues,
(issue) => let f = issue[fields] in [
#"Key" = issue[key],
#"Summary" = Plain(Get(f, "summary")),
#"Work type" = Get(Get(f, "issuetype"), "name"),
#"Status" = Get(Get(f, "status"), "name"),
#"Priority" = Get(Get(f, "priority"), "name"),
#"Assignee" = Get(Get(f, "assignee"), "displayName"),
#"Created" = When(Get(f, "created")),
#"Updated" = When(Get(f, "updated")),
#"Resolved" = When(Get(f, "resolutiondate")),
#"Due date" = Day(Get(f, "duedate"))
]
),
Result = Table.FromRecords(
Rows,
type table [
#"Key" = nullable text,
#"Summary" = nullable text,
#"Work type" = nullable text,
#"Status" = nullable text,
#"Priority" = nullable text,
#"Assignee" = nullable text,
#"Created" = nullable datetimezone,
#"Updated" = nullable datetimezone,
#"Resolved" = nullable datetimezone,
#"Due date" = nullable date
]
)
in
Result
Google Sheets
- Create an API token as above.
- In the sheet: Extensions > Apps Script, paste the code over what is there and save.
- Project Settings > Script properties: add two. Property
JIRA_EMAILwith your e-mail as the value, and propertyJIRA_TOKENwith the token as the value. People who can edit the sheet can open the script and read them, so use a token with the scoperead:jira-workor keep the sheet to yourself. - Reload the sheet and choose Jira > Refresh now, or Refresh every hour.
// Jira work items for Google Sheets (Extensions > Apps Script).
// Project Settings > Script properties: JIRA_EMAIL = your Atlassian e-mail, JIRA_TOKEN = an API token.
// Made with https://simplify-software.org/tools/jira-excel-power-query
const SITE = "https://your-site.atlassian.net";
const JQL = "project = WEB AND created >= -90d ORDER BY created DESC";
const SHEET = 'Jira';
const COLUMNS = [
{ id: "key", name: "Key", kind: "issue" },
{ id: "summary", name: "Summary", kind: "text" },
{ id: "issuetype", name: "Work type", kind: "name" },
{ id: "status", name: "Status", kind: "name" },
{ id: "priority", name: "Priority", kind: "name" },
{ id: "assignee", name: "Assignee", kind: "user" },
{ id: "created", name: "Created", kind: "datetime" },
{ id: "updated", name: "Updated", kind: "datetime" },
{ id: "resolutiondate", name: "Resolved", kind: "datetime" },
{ id: "duedate", name: "Due date", kind: "date" },
];
function onOpen() {
SpreadsheetApp.getUi().createMenu('Jira')
.addItem('Refresh now', 'refreshJira')
.addItem('Refresh every hour', 'refreshEveryHour')
.addToUi();
}
function refreshEveryHour() {
ScriptApp.getProjectTriggers()
.filter((t) => t.getHandlerFunction() === 'refreshJira')
.forEach((t) => ScriptApp.deleteTrigger(t));
ScriptApp.newTrigger('refreshJira').timeBased().everyHours(1).create();
}
function refreshJira() {
const lock = LockService.getScriptLock();
lock.waitLock(30000);
try {
// With a wrong token the search answers "200, no work items", so ask who is signed in first
for (const name of ['JIRA_EMAIL', 'JIRA_TOKEN']) {
if (!secret(name)) throw new Error('Script property ' + name + ' is not set. Put ' + name + ' in the field Property, and your own in Value.');
}
const signIn = callJira('/rest/api/3/filter/defaultShareScope').status;
if (signIn === 401) throw new Error('Jira did not accept the script properties JIRA_EMAIL and JIRA_TOKEN.');
if (signIn !== 200) throw new Error('Jira answered ' + signIn + ' to the sign-in check.');
const fields = [...new Set(COLUMNS.filter((c) => c.kind !== 'issue').map((c) => c.id))];
const rows = [];
let token;
do {
const answer = callJira('/rest/api/3/search/jql', { jql: JQL, fields: fields, maxResults: 100, nextPageToken: token });
if (answer.status !== 200) {
throw new Error('Jira answered ' + answer.status + ': ' + JSON.stringify(answer.body.errorMessages || answer.body));
}
for (const issue of answer.body.issues) rows.push(COLUMNS.map((c) => safe(valueOf(issue, c))));
token = answer.body.isLast ? undefined : answer.body.nextPageToken;
} while (token);
// Written only after every page has arrived, so a failed refresh leaves the old rows in place
const book = SpreadsheetApp.getActive();
const sheet = book.getSheetByName(SHEET) || book.insertSheet(SHEET);
sheet.clearContents();
sheet.getRange(1, 1, 1, COLUMNS.length).setValues([COLUMNS.map((c) => safe(c.name))]).setFontWeight('bold');
sheet.setFrozenRows(1);
if (rows.length) {
sheet.getRange(2, 1, rows.length, COLUMNS.length).setValues(rows);
COLUMNS.forEach((c, i) => {
if (c.kind === 'datetime') sheet.getRange(2, i + 1, rows.length, 1).setNumberFormat('yyyy-mm-dd hh:mm');
});
}
book.toast(rows.length + ' work items', 'Jira');
} finally {
lock.releaseLock();
}
}
function secret(name) {
return (PropertiesService.getScriptProperties().getProperty(name) || '').trim();
}
function callJira(path, payload) {
const login = Utilities.base64Encode(secret('JIRA_EMAIL') + ':' + secret('JIRA_TOKEN'));
for (let attempt = 1; ; attempt++) {
const response = UrlFetchApp.fetch(SITE + path, {
method: payload ? 'post' : 'get',
contentType: 'application/json',
payload: payload ? JSON.stringify(payload) : undefined,
headers: { Authorization: 'Basic ' + login, Accept: 'application/json' },
muteHttpExceptions: true,
});
const status = response.getResponseCode();
if ((status === 429 || status === 503) && attempt < 5) {
Utilities.sleep(1000 * Number(response.getHeaders()['Retry-After'] || attempt * 5));
continue;
}
let body = {};
try { body = JSON.parse(response.getContentText()); } catch (e) { /* not JSON, for example a 401 page */ }
return { status: status, body: body };
}
}
// Text that starts with = or + would run as a formula, and anyone who can write a work item could plant one
function safe(value) {
return typeof value === 'string' && /^[=+]/.test(value) ? "'" + value : value;
}
function valueOf(issue, column) {
if (column.kind === 'issue') return issue.key;
const v = issue.fields[column.id];
if (v === null || v === undefined) return '';
switch (column.kind) {
case 'name': return v.name || '';
case 'category': return v.statusCategory ? v.statusCategory.name : '';
case 'user': return v.displayName || '';
case 'key':
case 'parent': return v.key || '';
case 'hours': return typeof v === 'number' ? v / 3600 : '';
case 'datetime': return typeof v === 'string' && v.length > 20 ? new Date(v.replace(/(\d\d)$/, ':$1')) : '';
case 'option': return v.child ? v.value + ' / ' + v.child.value : v.value || '';
case 'rich': return rich(v);
case 'list': return [].concat(v).map(one).join('; ');
case 'number': return typeof v === 'number' ? v : typeof v === 'string' && v !== '' && !isNaN(v) ? Number(v) : '';
case 'date': return typeof v === 'string' ? v.slice(0, 10) : '';
default: return typeof v === 'string' ? v : v.type === 'doc' ? rich(v) : [].concat(v).map(one).join('; ');
}
}
function one(v) {
return v && typeof v === 'object' ? v.displayName || v.name || v.value || v.key || '' : String(v);
}
// Jira Cloud keeps rich text as a tree: paragraphs, lists, mentions
function rich(node) {
if (typeof node === 'string') return node;
if (node.type === 'hardBreak') return '\n';
if (node.text) return node.text;
if (node.content) {
const lines = ['doc', 'bulletList', 'orderedList', 'listItem', 'blockquote', 'table', 'tableRow'].includes(node.type);
return node.content.map(rich).join(lines ? '\n' : '');
}
return node.attrs ? node.attrs.text || node.attrs.url || '' : '';
}
What breaks the scripts you find in forums
We called a public Jira Cloud site with and without a token on 25 November 2026. Five things an older script runs into:
| What the script does | What Jira Cloud answers now | What the code here does |
|---|---|---|
| Calls /rest/api/3/search | 410: “The requested API has been removed.” | Calls /rest/api/3/search/jql |
| Asks for maxResults=1000 | 100 work items and isLast: false. Only id and key come in pages of 5,000 | Follows nextPageToken to the last page |
| Sends a wrong or expired token | 200 and an empty list, as for a visitor who is not signed in | Asks for a filter setting first, which answers 401 without a sign-in, and stops with a message |
| Has no filter in the JQL | 400: “Unbounded JQL queries are not allowed here.” | Asks you for a condition before making the code |
| Builds the address from text | Works on the desktop, but the Power BI service cannot refresh most dynamic sources | Keeps the site fixed and uses RelativePath and Query, the exception Microsoft names |
How many rows it can take
The Google Sheets script read 1,216 work items in 13 pages in our test, all 1,216 different, and Jira’s own count for the same JQL was 1,216. A page took from 0.9 seconds (two columns) to 4 (with descriptions). Google stops a script after 6 minutes, which by our estimate is 9,000 to 40,000 work items. For comparison, Atlassian says “a limit of 10K issue” for its own Excel add-in. Need a file once? The export menu does 10,000 without any token.
How it was checked, and what was not
- The Google Sheets script ran against that public Jira Cloud site, outside Google: the fetches were real, the sheet was simulated. On 25 November 2026 it ran in real Google Sheets too: 42 work items in five pages, the same cells as Power BI.
- The Power Query code passes Microsoft’s own Power Query parser. An evaluator of ours then ran it on a pretend Jira (0 to 250 work items, wrong sign-in, wrong field kinds) and on the public site: 1,216 rows again. On 25 November 2026 Power BI Desktop 2.160 loaded 42 work items of a site of ours, in one page and in five; the values we could read back matched Jira. It has not been run in Excel, which is not on our test computer.
- Work items you cannot see in Jira are not in the answer: the code reads with your permissions.
- A cell that starts with = or + is written to Google Sheets as text. Otherwise anyone who can create a work item could plant a formula in your sheet.
- Values are today’s. Comments, worklogs and status history are separate calls and are not included.
Sprint dates as a column
Jira has no field for the day a sprint ends, so no sheet can show it. JQL Blocks adds Sprint start date, Sprint end date and Sprint complete date as Jira fields, on the work item and in JQL. Add them above as custom fields of the kind datetime.
Next to this page: the JQL builder to write the query, and the CSV import validator for the way back into Jira. If the sheet is there to tell people what happened this week, Report Assistant writes that report in Jira.
Frequently asked questions
How do I connect Jira to Power BI without a connector?
Use Power Query’s web source: Get Data, Blank Query, Advanced Editor, paste the code from this page, and sign in with Basic, your Atlassian e-mail as the user name and an API token as the password. Power BI then reads Jira’s own REST API.
Why does my old Power Query script for Jira stop with 410 Gone?
Jira Cloud removed /rest/api/3/search and /rest/api/2/search. The new address is /rest/api/3/search/jql, which has no startAt: each page gives a nextPageToken for the next one. Scripts written before 2025 need that change.
Why do I get only 100 work items?
One page of the new search holds 100 work items as soon as you ask for fields, whatever maxResults says. The code here asks for the next page until Jira says it was the last one.
Why is the table empty although the JQL finds work items?
Most often the e-mail or the API token is wrong or expired. Jira does not answer with an error: it treats the call as anonymous and finds nothing. The code here asks Jira who is signed in first and stops with a message instead.
Is the API token in the file I share?
No. Excel and Power BI keep it in their own credential store, and Google Sheets in the script properties. The code holds only your site address, the JQL and the field names. People you share the file with still see the rows you loaded.
Can the sheet refresh by itself?
Yes. Excel refreshes on Refresh All or when the file opens, Power BI on its schedule, and the Google Sheets script every hour after you choose Jira, Refresh every hour in its menu.