Sabtu, 25 Agustus 2012

[smf_addin] Digest Number 2324

2 New Messages

Digest #2324
1a
smfforecrecalculation by "wongkayau" wongkayau
1b
Re: smfforecrecalculation by "Randy Harmelink" rharmelink

Messages

Fri Aug 24, 2012 11:02 pm (PDT) . Posted by:

"wongkayau" wongkayau


Hi Randy,

This forum is awesome! Very appreciated.

Just a quick question.

"Smfforecrecalculation" basically has 2 functions: (1) clear cache and (2) update data from websites. Could you pls tell me the macro for (1)?

I have built a spreadsheet to download data from Bloomberg.com. I download quite a no. of stocks (about 250). To speed up the downloading, I have drafted a macro to update 5 stocks each time. However, the data couldn't be refreshed, even though I manually clear everything (temp internet files, cookies, history, etc) in the IE9. "Smfforecrecalculation" may help, but it forces me to download all 250 stocks at the same time which holds up my computer by 15-20mins.

I tried google and find the followings scripts but they are no different to manual clearance of internet files.
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 "
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"
Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351"

Thank you so much!

Cheers,
L

Fri Aug 24, 2012 11:22 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

Go to the LINKS area of the Yahoo group and read the info on the macro.

Basically, the add-in stores the web pages internally, and then the
functions extract the data from those stored web pages, so clearing other
temporary files or cache areas won't touch those.

So, the two functions are actually (1) purge all saved web pages, and (2)
recalculate (which causes all needed web pages to be retrieved and saved
again). To selectively purge a few web pages and then selectively update
the related functions would be non-trivial.

Would it be possible to use the smfUpdateDownloadTable to do your updating?
It saves values instead of using recalculating formulas. It updates from
the top of the table to the first blank ticker symbol, so you could put
those you want to update at the top, followed by a blank line.

There was an enhancement I wanted to make too -- someone posted a routine
that I was going to add, that would ONLY updated highlighted lines. So you
could pick your rows, and then run the macro to only update those rows. The
discussion was here:

http://finance.groups.yahoo.com/group/smf_addin/message/15341

Another option you could look at is to trick the add-in into thinking
you're getting a new web page for those you want to update -- I've done
that before, when I want to recalculate selected items.

For example, suppose I have this function:

=RCHGetTableCell("http://finance.yahoo.com/q/ks?s=MMM",1,"Market Cap
(intraday)")

If I create a new URL with a dummy variable, it will treat that as a new
web page:

=RCHGetTableCell("http://finance.yahoo.com/q/ks?s=MMM&dummy=1",1,"Market
Cap (intraday)")

Now if the ticker symbol were in column B and a dummy value were in column
C:

=RCHGetTableCell("http://finance.yahoo.com/q/ks?s="&B6&"&dummy="&C6,1,"Market
Cap (intraday)")

...then all I need to do is change the value in column C to force an
update. Note that the value you change it to has to be one you haven't
already used, otherwise it would just go back and extract data from the
previously saved web page.

On Fri, Aug 24, 2012 at 10:03 PM, wongkayau <wongkayau@yahoo.com> wrote:

>
> Just a quick question.
>
> "Smfforecrecalculation" basically has 2 functions: (1) clear cache and (2)
> update data from websites. Could you pls tell me the macro for (1)?
>
> I have built a spreadsheet to download data from Bloomberg.com. I
> download quite a no. of stocks (about 250). To speed up the downloading, I
> have drafted a macro to update 5 stocks each time. However, the data
> couldn't be refreshed, even though I manually clear everything (temp
> internet files, cookies, history, etc) in the IE9. "Smfforecrecalculation"
> may help, but it forces me to download all 250 stocks at the same time
> which holds up my computer by 15-20mins.
>
> I tried google and find the followings scripts but they are no different
> to manual clearance of internet files.
> Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8 "
> Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"
> Shell "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351"
>

Tidak ada komentar:

Posting Komentar