Way to get indices daily data
In your any excel file Put any object on any worksheet.
That objet is bottom
Copy this code and paste it to mecro sheet.
Link code with button. Before clicking button
Add a new sheet and name that B
Now click button and see data in sheet B
Sub NSEindices()
Sheets("B").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://nseindia.com/marketinfo/indices/indexwatch.jsp", Destination:= _
Range("$A$1"))
.Name = "indexwatch_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "3,5"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Range("A15:A27").Select
Selection.EntireRow.Delete
Range("A2").Select
Columns("A:A").ColumnWidth = 17.29
Range("B3").Select
Selection.EntireColumn.Delete
Range("B16").Select
End Sub