Get Data From Web Page

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Code:
Declare Function URLDownloadToFile Lib "urlmon" Alias _
     "URLDownloadToFileA" (ByVal pCaller As Long, _
     ByVal szURL As String, _
     ByVal szFileName As String, _
     ByVal dwReserved As Long, _
     ByVal lpfnCB As Long) As Long


 Function DownloadFile(URL As String, LocalFilename As String) As Boolean
     Dim ret As Long
     ret = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
     If ret = 0 Then DownloadFile = True
 End Function

 Sub DownloadFromSite()
     
     Dim sURL    As String
     Dim sLocalFilename   As String
     
     sLocalFile = "C:\1.asp"
     sURL = "http://finans.mynet.com/cb/canliyayin.asp"
     
     Debug.Print DownloadFile(sURL, sLocalFile)
     
 End Sub
 
Upvote 0
There is no data to get from the page that URL points to.

The page is generated through ASP, I don't think AJAX is involved.

If there was data of some sort there are various ways you could try to get it.

Which to use it's pretty hard say which to choose.

PS Isn't that address for some sort of log in page?
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top