ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retrieving data from online excel spreadsheet. (https://www.excelbanter.com/excel-programming/443473-retrieving-data-online-excel-spreadsheet.html)

TFriis

Retrieving data from online excel spreadsheet.
 
Hi.

I've created a workbook that retrieves data from an online spreadsheet
once a day. - The problem is that it seems like the data is not
updated in online workbook when I open it (even though it is).

I figured the problem was the cache - so I found a macro that clears
the cache, but it didn't help. It feels like excel keeps opening some
old tmp file? But I can't figure out where this "tmp" file is located?
Or if it might be another issue?

The code (as a snippet) is shown beneath.


Public Declare Function DeleteUrlCacheEntry Lib "wininet" _
Alias "DeleteUrlCacheEntryA" _
(ByVal lpszUrlName As String) As Long

Sub Mac()
Dim FileLink as string

FileLink = "http://www.ftnet.dk/graphics/Finanstilsynet/Mediafiles/
newdoc/" _
& "Diskonteringsrente/Justeret_diskonteringssatser.xls"

Call DeleteUrlCacheEntry(FileLink)

Workbooks.Open Filename:=FileLink

End Sub

I know this is difficult for you to test, since the spreadsheet is
only updated once a day (before lunch GMT+1) - but you've might run
into the same issue? Hope that there is an easy solution.


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

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