Hello there,
I have a basic knowledge of VBA but webscraping, javascript etc is completely new for me.
I have been trying to figure out how to extract (3) tables from the following url: Export Fundamental Data U.S. and International Stocks - QuickFS.net
Through a dropdown I need to get to the Incomestatement, Balance sheet and Cashflow Statement
When I inspect the elements I think below html / javascript statement (s) is the key.
Income Statement <table class="fs-table" id="is-table">
Balance Sheet <table class="fs-table" id="bs-table">
Cashflow Statement <table class="fs-table" id="cf-table">
The table class remains the same whilst the id refers to the different statements
I managed some code to access the Income Statement, but I can not figure out how to get to the others
I would really appreciate if anybody can help me out here
--------------------------------------------------------------------------------------------------------------
Sub GetQuickfs()
Dim IE As New InternetExplorer, html As HTMLDocument
Dim elem As Object, data As String
webaddress = "Export Fundamental Data U.S. and International Stocks - QuickFS.net"
With IE
.Visible = False
.navigate webaddress
Do While .readyState <> READYSTATE_COMPLETE: Loop
Set html = .document
End With
For Each elem In html.getElementsByClassName("fs-table")(0).getElementsByTagName("td")
data = elem.innerText
Debug.Print data
Next elem
IE.Quit
End Sub
------------------------------------------------------------------------------------------------------------------------------------------------
I have a basic knowledge of VBA but webscraping, javascript etc is completely new for me.
I have been trying to figure out how to extract (3) tables from the following url: Export Fundamental Data U.S. and International Stocks - QuickFS.net
Through a dropdown I need to get to the Incomestatement, Balance sheet and Cashflow Statement
When I inspect the elements I think below html / javascript statement (s) is the key.
Income Statement <table class="fs-table" id="is-table">
Balance Sheet <table class="fs-table" id="bs-table">
Cashflow Statement <table class="fs-table" id="cf-table">
The table class remains the same whilst the id refers to the different statements
I managed some code to access the Income Statement, but I can not figure out how to get to the others
I would really appreciate if anybody can help me out here
--------------------------------------------------------------------------------------------------------------
Sub GetQuickfs()
Dim IE As New InternetExplorer, html As HTMLDocument
Dim elem As Object, data As String
webaddress = "Export Fundamental Data U.S. and International Stocks - QuickFS.net"
With IE
.Visible = False
.navigate webaddress
Do While .readyState <> READYSTATE_COMPLETE: Loop
Set html = .document
End With
For Each elem In html.getElementsByClassName("fs-table")(0).getElementsByTagName("td")
data = elem.innerText
Debug.Print data
Next elem
IE.Quit
End Sub
------------------------------------------------------------------------------------------------------------------------------------------------