OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Script needed to extract financial tables from the Saudi Exchange website [closed]

  • Thread starter Thread starter Abdulaziz 09
  • Start date Start date

Abdulaziz 09

I hope you're doing well.

I'm working on my investing sheets and I want to extract the financial data from the Saudi Exchange website. (Example webpage: https://www.saudiexchange.sa/wps/po...yU8v1wwkpK8hOMgUA-oskdg!!/?companySymbol=2020)

enter image description here

As you can see from the picture above, when I search for the financial statements of a company I get these tables. As you can see on the bottom left (Highlighted in red), you will see a button that says "Display Previous Periods" (by default). What I want is the previous periods (which already clicked and showed in the picture). The first table you will encounter is the "Balance Sheet". The Balance Sheet is easy to get using the function "IMPORTHTML" which I already did as you can see below with a little bit of modification. I started with a TRANSPOSE function to get the data in rows not in columns as the above picture then I used QUERY function to get each year in single row with selected data. Then I used the IMPORTHTML to get the data using the "Company Ticker" (I want it to be dynamic).

This process is impossible to do with the other two statements as the website uses JavaScript to make dynamic table (As per my search in the web) and I asked in google sheet community if it can be done using google sheet scripts (Google apss) but unfortunately it can't (As far as I know, if there is a way it will be better). Can it be done using VSC where I give the companies trickers and get the financial statments and then copy them to google sheet? enter image description here

My reason to ask for help is that I don't have any knowledge in any programming langue and I want a script that I can run to get the other two statements data. It's favorable that the script get the Statement of Income in the same format as the Balance Sheet is presented (and the same for the Cash Flow Statement).

I know my request maybe hard and take time to accomplish and unfortunately I don't have the time to learn how to program to do it myself that's why I asked here for help.

Thank you all in advance.

I tired to use the IMPORTHTML, IMPORTXML functions and also Google apss with no success. If someone can help me with a code or script that I can use to get the data of any company I will be thankful.

Continue reading...

Latest posts