Search code examples
pythonexcelcopyxbrlarelle

Arelle automate small procedure to trasfer data to Excel by using Python


If we do these simple steps we will use Arelle to fetch data from the SEC EDGAR database into the Arelle program.

The steps are:

  1. Open Arelle and click the Open web file which is an icon-button on the left top of the Arelle screen.
  2. A box called Enter URL pops up. Please provide a URL that contains an XBRL Instance from the Security and Exchange Commission (you can take this URL for example) and click OK.
  3. When Arelle finished downloading (it takes ~10sec) please click the scale button which has an icon-button of a scale sketching second from the end on top left of the Arelle screen.

Now here is the simple procedure i want to Automate in Arelle with Python:

  1. There is a tab in Arelle called Fact Table which has some items that can expand by clicking the plus sign next to them into a tree.

  2. Without opening any of them if you right click one of them for example 0110 - Statement - Consolidated Balance Sheets which is the second item you can go Copy to clipboard and then click Table.

  3. Now please go to Excel and choose Cell A1 and paste the data by pushing Ctrl + V

SUMMARY: All i want is to do this in Python automatically.

Thank you for your attention.


Solution

  • Arelle provide a Python API that you can find here with the documentation here.

    This API will allow you to automate your process by scripting actions, this removes the necessity to automate working with the GUI itself which would be cumbersome.