ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Web Query (https://www.excelbanter.com/excel-programming/337941-web-query.html)

janetb[_2_]

Web Query
 

Brand new to web queries and I'm having a problem getting it set up.
Created a page which returns a single table. Created a spreadshee
with webquery containing 1 static parameter and two dynamic parameters

If I go to the web page without the Excel Web query everything is fine

http://www.mahec.net/nfd/print2.asp?...ndDate=7/2/200


But when I try to use a web query, it prompts me for the two dates, bu

tells me there's no data in the web query.
Here's the formula bar:
print2.aspid=12&["startDate","start"]&["endDate","End"]

Any help appreciated

--
janet
-----------------------------------------------------------------------
janetb's Profile: http://www.excelforum.com/member.php...nfo&userid=403
View this thread: http://www.excelforum.com/showthread.php?threadid=39779


Dick Kusleika[_4_]

Web Query
 
Maybe you're missing the question mark in the url?

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

janetb wrote:
Brand new to web queries and I'm having a problem getting it set up.
Created a page which returns a single table. Created a spreadsheet
with webquery containing 1 static parameter and two dynamic
parameters.

If I go to the web page without the Excel Web query everything is
fine:

http://www.mahec.net/nfd/print2.asp?...dDate=7/2/2005


But when I try to use a web query, it prompts me for the two dates,
but

tells me there's no data in the web query.
Here's the formula bar:
print2.aspid=12&["startDate","start"]&["endDate","End"]

Any help appreciated.




janetb[_3_]

Web Query
 

Naw, looks like I copy/pasted in a hurry. Full url in Excel formula bar
is:

print2.asp?id=12&["startDate","StartDate"]]&["endDate","EndDate"]

I notice it doesn't give the full url just starting at the document
name. Is that saved somewhere else. I was wanting to keep the
url/parameters within the spreadsheet - it's not needed elsewhere.

The asp page is in table format not xml. Is that okay?

Thanks for the reply - jb


--
janetb
------------------------------------------------------------------------
janetb's Profile: http://www.excelforum.com/member.php...fo&userid=4034
View this thread: http://www.excelforum.com/showthread...hreadid=397791


Dick Kusleika[_4_]

Web Query
 
Janet

Can you walk me through what you're doing? When I do a web query, I go to
Data Get External Data New Web Query and paste in the URL. The URL
never shows up in the formula bar that I know. Maybe we're talking about
different things.

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

janetb wrote:
Naw, looks like I copy/pasted in a hurry. Full url in Excel formula
bar is:

print2.asp?id=12&["startDate","StartDate"]]&["endDate","EndDate"]

I notice it doesn't give the full url just starting at the document
name. Is that saved somewhere else. I was wanting to keep the
url/parameters within the spreadsheet - it's not needed elsewhere.

The asp page is in table format not xml. Is that okay?

Thanks for the reply - jb




janetb[_4_]

Web Query
 

I got this to work in the module section, but I'm really curious as t
what I was doing wrong with the GOOEY interface. Can anyone help m
out? I still can't get the other method to work.

Sub URL_Get_Query()
With ActiveSheet.QueryTables.Add(Connection:= _

"URL;http://www.mahec.net/nfd/print2.asp?id=12&startDate=[""startDate"",""Ente
start date.""]&endDate=[""endDate"",""Enter end date.""]", _
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

Thanks,
Jane

--
janet
-----------------------------------------------------------------------
janetb's Profile: http://www.excelforum.com/member.php...nfo&userid=403
View this thread: http://www.excelforum.com/showthread.php?threadid=39779


janetb[_5_]

Web Query
 

Got it! In case anyone else needs it, I was missing quote marks and
another set of parameter info:

print2.asp?id=12&startDate=["'startDate'","start"]&endDate=["'endDate'","End"]


--
janetb
------------------------------------------------------------------------
janetb's Profile: http://www.excelforum.com/member.php...fo&userid=4034
View this thread: http://www.excelforum.com/showthread...hreadid=397791



All times are GMT +1. The time now is 01:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com