Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
Edit Query from Excel will not open query in MSQuery | Excel Programming | |||
How to use a Access Query that as a parameter into Excel database query | Excel Discussion (Misc queries) |