Extract data from website

pksinghal

New Member
Joined
Apr 10, 2015
Messages
38
Hi

I need help from seniors.

I want to extract data from a website.


When i use option Data--->> From Web and then import it.

It doesn't import numeric value .


I also used VBA . but failed.

Function GetSpecificStockFuturesData(strName As String)

Dim c As Range
'Dim strName As String
Dim strConnString As Variant
Dim QT As QueryTable
On Error Resume Next
Dim wss As Worksheet
Dim wsd As Worksheet

If (TradingWindowOpen = False) Then

Worksheets("Main").Range("REFRESH_STATUS") = "NO Refresh between 9:00 AM and 9:20 AM"

Exit Function
End If

'clear all existing query tables
For Each QT In Worksheets("Data").QueryTables
QT.Delete
Next QT


strConnString = "url;NSE - National Stock Exchange of India Ltd."

Set QT = Worksheets("Data").QueryTables.Add(Connection:=strConnString, Destination:=Worksheets("Data").Range("$AH$1"))

With QT

.Name = strName & "_Futures"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = False
.AdjustColumnWidth = False
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.MaintainConnection = False

End With

'.Refresh BackgroundQuery:=False
QT.Refresh BackgroundQuery:=False

'clear all existing query tables
For Each QT In Worksheets("Data").QueryTables
QT.Delete
Next QT


End Function
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Do you have a Queries and connections pane on the right hand side?
 
Upvote 0
Hi Mark,

No I don't have queries.

If you just simply go to import this page

The data doesn't come.

Please check
 
Upvote 0
I am using Excel 2010.

Goto data menu--->>from web--- entered URL

Then click on options-->> disable date recognition and disable web query redirection.

Then click on import
 
Upvote 0
I'm not home (due to xmas) and so don't have access to my laptop with 2010 on it to try and extract with it.
Hopefully someone else will be able to jump in.
 
Upvote 0
I am afraid that I have had a quick try at downloading it with 2010 and get hashes where the data should be.
I will try and have another play with it when I can sit in front of laptop for a decent amount of time.
Please don't expect a quick response from me.
Hopefully someone else will spot something obvious.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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