Home › Forums › The XBRL API › Refreshing XBRL data from within VBA
- This topic has 3 replies, 2 voices, and was last updated 8 months, 3 weeks ago by David Tauriello.
-
AuthorPosts
-
-
Tuesday, June 14, 2022 at 12:13 PM #201407Peter GuldbergParticipant
Is there a way to make an XBRL query refresh when you are within an Excel-VBA sub?
When you are running a VBA sub, and this changes a cell that the XBRL query is dependent on, the XBRL fields change to #BUSY!, and they do not update until the macro has actually finished.
-
Thursday, June 23, 2022 at 12:31 PM #201521David TaurielloKeymaster
Hi Peter – an Excel user who’s worked with VBA wrote and would like to know a bit more about what you’re trying to accomplish in VBA.
Can you post a rough set of steps for this interaction?
-
Thursday, June 23, 2022 at 4:29 PM #201529Peter GuldbergParticipant
Ok, let me try to explain:
I have a worksheet where I input the CIK for one specific issuer.
This pulls a list into the worksheet of all of the 10-Q and 10-K reports by that issuer.
For the oldest report the worksheet then pulls in the facts from that report that are relevant to me.So far, no VBA, just XBRL.showData() functions in the worksheet.
I then want to use VBA to do the following steps:
1. Store the relevant facts, mentioned above, in my own DB.
2. Select the next-oldest report from the worksheet, and make the worksheet pull in the relevant facts from that report into the worksheet, still using the XBRL.showData() Function.
3. Go back to step 1.
This works fine for the first/oldest report, but once we get to the next report the XBRL.showData() function does not update. It just displays #BUSY!, because the VBA-macro is still running.
Once the VBA stops running, the function updates almost immediately.In Google Sheets with App Script this does work as long as you insert pauses that allows the function to update.
-
Saturday, July 2, 2022 at 9:44 AM #201671David TaurielloKeymaster
Peter – thanks for taking a look at the materials I passed in email from another XBRL US Member. I sent along your appreciation for his efforts in using the data.
We’re working out how to provide face financial data through endpoints to the XBRL API – stay tuned.
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
Recent Replies
-
How to gracefully handle duplicate values 1 week, 2 days ago
-
Dictionary of concepts 1 month, 2 weeks ago
-
NAICS CODE 2 months, 1 week ago
-
Lists of similar concepts 2 months, 2 weeks ago
-
Lists of similar concepts 2 months, 2 weeks ago
Documentation & Discussion
- Get started with Google Sheets OR
- Get started with Microsoft Excel OR
- Get access to as-filed data from us for other tools or your own app
- XBRL API Interactive Documentation
- The XBRL API
- XBRL Data Community
- 2022 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
Who's using this free data?
API Use 2022 || API Use 2021
API Use 2020 || API Use 2019
API Use 2018
Join XBRL US
- Individual Options - Basic, Power User & Sole Practitioner
- For Your Team - Startup, Non-Profit, Academic & Corporate options
- Member Benefits Comparison Table
Using the XBRL API with the Public Filings Database
Unless otherwise agreed to in writing, any and all use of the XBRL API to authenticate and retrieve data from the XBRL US Database of Public Filings implies user consent and agreement with the XBRL US API Agreement. If you are unable to agree to these terms, do not use the XBRL API.
To use the XBRL API outside of Google Sheets, your account needs to be provisioned for OAuth2 access.
Comment
You must be logged in to post a comment.