MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 08:12 PM   #1
gg
 
Join Date: Nov 2003
Posts: 539
Default Multple Web query (with out HTML)

I am using a web query but it is pulling in html format
also as seen below. Is it possible to only pull text?

Below the example is the code I am using to retrieve all the querys together?


******** ******************** ************************************************************************>
Microsoft Excel - mlb.xls___Running: xl2000 : OS = Windows 98
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
=

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
15
Profile*for...*ANA*AngelsAL*WESTWLPctSituationG#W-LO-URuns**********
16
Games**162OAK*Athletics96660.593All*Games**16277-8575-834.54**********
17
Record**77-85SEA*Mariners93690.574Road**8032-4842-364.8**********
18
O/U*Record**75-83ANA*Angels77850.475Home**8245-3733-474.29**********
19
ROI**-8.90%TEX*Rangers71910.438Favorite**8545-4036-474.96**********
20
Team*Streak**Won*1*UnderDog**7329-4437-344.05**********
21
DateSiteOpponentNScoreS/ULineTotalO/UTurfStarterOpp*Starter*
22
3/30/2003HomeRangers*6-MarL-155UNLackeyValdes*(R)*
23
4/1/2003HomeRangersNOct-00W-125ONCallwayPark*(R)*
24
4/2/2003HomeRangers*5-NovW-165ONOrtizThomson*(R)*
25
4/4/2003AwayAthleticsN7-MarL135ONAppierLilly*(L)*
26
4/5/2003AwayAthletics*4-FebL100UNWshburnHalama*(L)*
Sheet2
Hyper Lynks Address is here ...

[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.


Currently I am running the below code that will run multiple query's at one time.? How do I make these quey's only bring in text? I can doin it manually

Sub ImportData()

Sheets(2).Activate
i = 1
Do Until Sheets(1).Cells(i, 1) = ""
myquery = Sheets(1).Cells(i, 1)
Sheets(2).Cells(1, 1) = myquery
myrow = Sheets(2).UsedRange.Rows.Count + 1
Do
myrow = myrow - 1
Loop Until Sheets(2).Cells(myrow, 1) <> ""
myrow = myrow + 1
With Sheets(2).QueryTables.Add(Connection:= _
"URL;" & myquery, Destination:=Sheets(2).Cells(myrow, 1))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
i = i + 1
Loop
gg is offline   Reply With Quote
Old Mar 31st, 2004, 03:45 AM   #2
gg
 
Join Date: Nov 2003
Posts: 539
Default Re: Multple Web query (with out HTML)

Bump
gg is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 04:50 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.