Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web query - unable to extract data
Hi,
I have recorded a macro through which i would like to extract data from web but unable to do so. Can someone help me. 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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web query - unable to extract data
I am not getting data, is there any way to get data from web directly to
excel with help of macro or any other mode. "Nigel" wrote: When you say recorded, you must have actually gone through the process to extract data, did that work? -- Regards, Nigel "Vijay Kotian" wrote in message ... Hi, I have recorded a macro through which i would like to extract data from web but unable to do so. Can someone help me. 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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Web query - unable to extract data
On Apr 17, 7:06*am, Vijay Kotian
wrote: I am not getting data, is there any way to get data from web directly to excel with help of macro or any other mode. "Nigel" wrote: When you say recorded, you must have actually gone through the process to extract data, did that work? -- Regards, Nigel "Vijay Kotian" wrote in message ... Hi, I have recorded a macro through which i would like to extract data from web but unable to do so. *Can someone help me. 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.- Hide quoted text - - Show quoted text - Either of the following approaches pastes the web data into my activesheet...Ron Sub test1() With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.bseindia.com/mktlive/market_summ/ categorywise_turnover.asp", _ Destination:=Range("A1")) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With End Sub ------------------------------------------------------------------------------ Sub test2() Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .Navigate "http://www.bseindia.com/mktlive/market_summ/ categorywise_turnover.asp" .Top = 50 .Left = 530 .Height = 400 .Width = 400 ' Loop until the page is fully loaded Do Until Not .Busy DoEvents Loop End With ' copy and paste ie.ExecWB 17, 2 ie.ExecWB 12, 0 ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:=False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Web query..... unable to get data ? | Excel Discussion (Misc queries) | |||
Unable extract data from WEB query | Excel Programming | |||
Extract Data using Web query | Excel Programming | |||
Data extract from access query | Excel Discussion (Misc queries) | |||
Using Microsoft Query to Extract Data | Excel Programming |