From a user:
I frequently get “Bad or expired Token” even when the code worked moments ago. I am working in Excel. Usually when this happens, it seems to affect other cells as well.
Short of closing and re-opening Excel, is there anything I can do to re-establish the add-in connection?
There may be many causes for this – momentary network disconnects or abandoning a query before it completes (revising it while the initial query is still processing) are common causes.
Excel has a reload option built into the task pane that should get you reconnected without closing and re-opening the application.
To use this option, click in an empty spot on the task pane, then use the menu indicator at the top-right corner of the task pane and select the Reload option (see the red circle in the image below).
After refreshing the task pane, go to the cell(s) where the =XBRL.showData() formula is used and add an asterisk before the equals sign, press enter, then remove the asterisk to re-initiate the query. You should be able to use Excel’s find and replace for this step if there are many queries.
Consider building query URLs in one cell, and calling them with XBRL.showData from another cell ( =XBRL.showData(A1, “”, “”, “1”) – this lets you manage the query independent of its execution.