Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 75
Default Web query..... unable to get data ?

Can someone help me out to extract data through web query.


With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.bseindia.com/mktlive/market_summ/categorywise_turnover.asp", _
Destination:=Range("A1"))
.Name = "categorywise_turnover"
.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 = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Web query..... unable to get data ?

Change to 7,8. Also, after established,just use this to refresh. Comment out
or delete unnecessary lines of code

sub refresh()
With ActiveSheet.QueryTables(1)
.Connection = _
"URL;http://www.bseindia.com/mktlive/market_summ/categorywise_turnover.asp"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7,8"
'---------------
'.WebPreFormattedTextToColumns = True
'.WebConsecutiveDelimitersAsOne = True
'.WebSingleBlockTextImport = False
'.WebDisableDateRecognition = False
'.WebDisableRedirections = False
'============
.Refresh BackgroundQuery:=False
End With
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Vijay Kotian" wrote in message
...
Can someone help me out to extract data through web query.


With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.bseindia.com/mktlive/market_summ/categorywise_turnover.asp",
_
Destination:=Range("A1"))
.Name = "categorywise_turnover"
.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 = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Web query..... unable to get data ?

For all tables use
..WebSelectionType = xlEntirePage
'.WebTables = "7,8"

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
Change to 7,8. Also, after established,just use this to refresh. Comment
out or delete unnecessary lines of code

sub refresh()
With ActiveSheet.QueryTables(1)
.Connection = _

"URL;http://www.bseindia.com/mktlive/market_summ/categorywise_turnover.asp"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "7,8"
'---------------
'.WebPreFormattedTextToColumns = True
'.WebConsecutiveDelimitersAsOne = True
'.WebSingleBlockTextImport = False
'.WebDisableDateRecognition = False
'.WebDisableRedirections = False
'============
.Refresh BackgroundQuery:=False
End With
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Vijay Kotian" wrote in message
...
Can someone help me out to extract data through web query.


With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.bseindia.com/mktlive/market_summ/categorywise_turnover.asp",
_
Destination:=Range("A1"))
.Name = "categorywise_turnover"
.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 = "8"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With

Thank you.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to query ASC and JIS function tsukki Excel Worksheet Functions 2 August 22nd 08 02:48 AM
Unable to open after auto refresh(Query) Irmann Excel Discussion (Misc queries) 0 January 8th 08 06:33 AM
Web query - Unable to open B. Wingbermuehle Excel Discussion (Misc queries) 0 May 26th 06 10:04 PM
Unable to edit query harriettbird Excel Discussion (Misc queries) 0 May 4th 06 02:10 PM
MS Query - unable to edit query Excel GuRu Excel Discussion (Misc queries) 9 April 12th 06 04:29 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"