ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   911 Excel Cache! (https://www.excelbanter.com/excel-programming/300531-911-excel-cache.html)

Edgardo Sepulveda

911 Excel Cache!
 
Hi, im having a problem with a little spider type application i made with
excel to import web pages, the scenario is the following:

My little excel spider, is supposed to get the same web page many times a
day, beacuse the content of this page, changes hour to hour, so this little
page, is created brand new daily, but in the course of the day, grows like a
log file, that's why i need the latest one, not the first one of the day

The problem is that i know know why, excel seems to work fine the firsts
hours, but suddently, keeps "bringing" the last one, not the real last page,
for instance, if i did this every hour, it works fine, until 2pm, and then
after 2pm, keeps bringing the 2pm page, even if the page did changed at 3
and 4 and so.

The questions are these:

Is there a page size cache trigger that fires when the page to load is
bigger than something? (not quite sure)
How can i flush excel cache programaticaly?
Am i doing something wrong in my code, putting it inside a vb.net timer
tick?
Im using Office XP to do this, and i've tryed also with Office 2003, any
clues why?

Here's my code

Dim xl As New Excel.Application()
xl.Workbooks.Open(http://www.mysite.com/mypage.html)

'mycode

xl.Workbooks(1).Close(savechanges:=False)
xl.Quit()
xl = Nothing
System.GC.Collect()

Thanks for your help

Edgardo



Martin[_16_]

911 Excel Cache!
 
Edgardo,

You need someone better than me for most of your questions, but where you
have:


How can i flush excel cache programaticaly?



May be worth a search on Google for:

"refreshing data from a web page" - 20 Jul 2000 by Peter Jamieson

The original query refers to Win95/Ofice97/IE4 but includes VBA method for
clearing TIFs.

HTH

Martin

Edgardo Sepulveda wrote in message
...
Hi, im having a problem with a little spider type application i made with
excel to import web pages, the scenario is the following:

My little excel spider, is supposed to get the same web page many times a
day, beacuse the content of this page, changes hour to hour, so this

little
page, is created brand new daily, but in the course of the day, grows like

a
log file, that's why i need the latest one, not the first one of the day

The problem is that i know know why, excel seems to work fine the firsts
hours, but suddently, keeps "bringing" the last one, not the real last

page,
for instance, if i did this every hour, it works fine, until 2pm, and then
after 2pm, keeps bringing the 2pm page, even if the page did changed at 3
and 4 and so.

The questions are these:

Is there a page size cache trigger that fires when the page to load is
bigger than something? (not quite sure)


How can i flush excel cache programaticaly?


Am i doing something wrong in my code, putting it inside a vb.net timer
tick?
Im using Office XP to do this, and i've tryed also with Office 2003, any
clues why?

Here's my code

Dim xl As New Excel.Application()
xl.Workbooks.Open(http://www.mysite.com/mypage.html)

'mycode

xl.Workbooks(1).Close(savechanges:=False)
xl.Quit()
xl = Nothing
System.GC.Collect()

Thanks for your help

Edgardo






All times are GMT +1. The time now is 10:24 AM.

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