Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default MS Excel Web Query

Windows XP, Excel 2000
Every day I use the following macro in order to import the day's quotes from
Yahoo.
Now I would have need to import some day's quotes from www.swissquote.ch
rather than from Yahoo.
I have tried to modify the macro but they are not successful to obtain the
intentional result.
You can help me?
Thanks a lot!
--
gildum

Antispam: replace 5 with 2




Sub test()

With ActiveSheet.QueryTables.Add(Connection:="URL;" & _
"http://it.finance.yahoo.com/d/quotes.csv?s=MSFT+IBM&f=sl1d1+1c1ohgv&e=.csv",
_
Destination:=ActiveSheet.Cells(1, 1))

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default MS Excel Web Query

You have not posted the code that you are now trying to use, so I can't say
much, but that site looks like it requires a login.
Maybe you can send the login details in the URL or The .PostText property of
the QT.
Also a bit more information would help: errors , results recieved/expected
etc

NickHK

"gildum" bl...
Windows XP, Excel 2000
Every day I use the following macro in order to import the day's quotes
from Yahoo.
Now I would have need to import some day's quotes from www.swissquote.ch
rather than from Yahoo.
I have tried to modify the macro but they are not successful to obtain the
intentional result.
You can help me?
Thanks a lot!
--
gildum

Antispam: replace 5 with 2




Sub test()

With ActiveSheet.QueryTables.Add(Connection:="URL;" & _
"http://it.finance.yahoo.com/d/quotes.csv?s=MSFT+IBM&f=sl1d1+1c1ohgv&e=.csv",
_
Destination:=ActiveSheet.Cells(1, 1))

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default MS Excel Web Query

Hi Nick,
The code that I am testing is:

Sub test2()

With ActiveSheet.QueryTables.Add(Connection:="URL;" & _
"http://www.swissquote.ch/cgi-bin/SQ_portfolio/pf_account.csv", _
Destination:=ActiveSheet.Cells(1, 1))

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

Whit this code I get the following error:

*Identificatin Error*
*Sorry, the program was not able to check your identification. The Cookie
may be expired. Please login again.*

To access manually the Portfolio Page the login require an UserID end the
Password. In the code I do not know how send them!

Thanks
--
gildum

Antispam: replace 5 with 2



"NickHK" ha scritto nel messaggio
...
You have not posted the code that you are now trying to use, so I can't
say much, but that site looks like it requires a login.
Maybe you can send the login details in the URL or The .PostText property
of the QT.
Also a bit more information would help: errors , results recieved/expected
etc

NickHK



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default MS Excel Web Query

Looks like the site sets a cookie when you login.
Unless you find some way to fake the cookie (which is not an Excel concern)
you are stuck with having to login.

NickHK

"gildum" wrote in message
...
Hi Nick,
The code that I am testing is:

Sub test2()

With ActiveSheet.QueryTables.Add(Connection:="URL;" & _
"http://www.swissquote.ch/cgi-bin/SQ_portfolio/pf_account.csv", _
Destination:=ActiveSheet.Cells(1, 1))

.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With
End Sub

Whit this code I get the following error:

*Identificatin Error*
*Sorry, the program was not able to check your identification. The Cookie
may be expired. Please login again.*

To access manually the Portfolio Page the login require an UserID end the
Password. In the code I do not know how send them!

Thanks
--
gildum

Antispam: replace 5 with 2



"NickHK" ha scritto nel messaggio
...
You have not posted the code that you are now trying to use, so I can't
say much, but that site looks like it requires a login.
Maybe you can send the login details in the URL or The .PostText

property
of the QT.
Also a bit more information would help: errors , results

recieved/expected
etc

NickHK





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
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 PM
Edit Query from Excel will not open query in MSQuery Michelle Excel Programming 0 February 21st 05 03:59 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"