Kamis, 23 Juni 2011

[smf_addin] Digest Number 1865

Messages In This Digest (2 Messages)

Messages

1a.

Retrieving CSV or xls file from http://www.hsi.com.hk/HSI-Net/HSI-Ne

Posted by: "boo1712" boo1712@yahoo.co.uk   boo1712

Thu Jun 23, 2011 2:51 am (PDT)



Hi Guys,

Is there any function from smf that can be used to download tables from the following urls?
1. http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/HSI_17Jun11.xls

2. http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/con_17Jun11.csv

I tried using smfgetcsvfile but cannot display the table properly.

I also tried using

qurl = "http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/HSI_17Jun11.xls"

QueryQuote:
With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl, Destination:=DataSheet.Range("a1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.SaveData = True
End With

but also return error.

Please advise.

Thanks.

1b.

Re: Retrieving CSV or xls file from http://www.hsi.com.hk/HSI-Net/HS

Posted by: "Ron" ronaldj309@cox.net   ronaldj309

Thu Jun 23, 2011 3:09 am (PDT)



Why not just download it from the Web Browser? In Google Chrome, if I click on the "....xls" link it is downloaded into my Downloads folder and then I can open it in EXCEL.

--- In smf_addin@yahoogroups.com, "boo1712" <boo1712@...> wrote:
>
> Hi Guys,
>
> Is there any function from smf that can be used to download tables from the following urls?
> 1. http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/HSI_17Jun11.xls
>
> 2. http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/con_17Jun11.csv
>
> I tried using smfgetcsvfile but cannot display the table properly.
>
>
>
> I also tried using
>
> qurl = "http://www.hsi.com.hk/HSI-Net/static/revamp/contents/en/indexes/report/hsi/HSI_17Jun11.xls"
>
> QueryQuote:
> With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl, Destination:=DataSheet.Range("a1"))
> .BackgroundQuery = True
> .TablesOnlyFromHTML = False
> .Refresh BackgroundQuery:=False
> .SaveData = True
> End With
>
> but also return error.
>
> Please advise.
>
> Thanks.
>

Recent Activity
Visit Your Group
New business?

Get new customers.

List your web site

in Yahoo! Search.

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yahoo! News

Fashion News

What's the word on

fashion and style?

Need to Reply?

Click one of the "Reply" links to respond to a specific message in the Daily Digest.

Create New Topic | Visit Your Group on the Web

Tidak ada komentar:

Posting Komentar