abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,494
- Office Version
- 2019
- 2010
- Platform
- Windows
Hello
I want to copy the whole TABLE contains values in sheet1 from a1: I as show in table 10 columns . so the website is not english it's arabic . and becarefule the table somtimes contains more than one page as in bottom by arrow should show whole of table . and should update the table automatically in excel without open website .
the code just open website
I want to copy the whole TABLE contains values in sheet1 from a1: I as show in table 10 columns . so the website is not english it's arabic . and becarefule the table somtimes contains more than one page as in bottom by arrow should show whole of table . and should update the table automatically in excel without open website .
the code just open website
VBA Code:
Sub OpenBrowser()
Dim IE As New SHDocVw.InternetExplorer
Dim html As MSHTML.HTMLDocument
Dim htmldatas As MSHTML.IHTMLElementCollection
Dim htmldata As MSHTML.IHTMLElement
IE.Visible = True
IE.Navigate "https://www.saudiexchange.sa/wps/portal/tadawul/market-participants/issuers/issuers-directory/company-details/!ut/p/z1/04_Sj9CPykssy0xPLMnMz0vMAfIjo8zi_Tx8nD0MLIy83V1DjA0czVx8nYP8PI0MDAz0I4EKzBEKDEJDLYEKjJ0DA11MjQzcTfW99KPSc_KTIGZllJQUWKkaqBqUJKYklpfmqBroRyXn5xYk5lUGV-Ym5QMVGRkYG-iHEzK1IDsop6zSUREAbm86Ww!!/#chart_tab2"
Do: Loop Until IE.ReadyState = READYSTATE_COMPLETE
Set html = IE.Document
Set htmldatas = html.body.getElementsByTagName("dataTables_processing")
For Each htmldata In htmldatas
Debug.Print htmldata.innerText
Next htmldata
End Sub