Refresh Excel Table from Access

dlugirapfr

Registered User.
Local time
Today, 23:54
Joined
Nov 22, 2012
Messages
68
Hi,

I tried to find topic with solution for my problem but I cannot.
I have Office 365 (32 bit)
I have to download Excel file from www. with direct link. So I have to do it in Excel (Acccess can only import XML file from www :( ).
I made Excel (sample.xlsx) file with connection to table on Internet and it works - I can refresh it etc.

I connected sample.xlsx to Access database.

How can I refresh data in sample.xlsx from Access?
Thank you for replay and links.
 
Couple ways to do this. Right-clicking on the linked table and selecting "Refresh Link" will do it. If you want to do it with code, here is a sub I copied from a VBA Forum a few years ago:
Code:
sub RefreshMyExcelTableLink()
    Dim tdf As DAO.TableDef

    Set tdf = Currentdb.TableDefs("TheNameOfYourExcelSheet")
    tdf.RefreshLink
    Set tdf = Nothing
end sub
 
Thank you for replay but I think in that way you refresh only link between access and excel.
I need to refresh data between Excel and Internet ;)
 
Perhaps need Excel automation code that executes refresh of web link.

For a start, turn on macro recorder in Excel, perform refresh procedure. Adapt macro generated code in Access VBA.
 
Apologies, I misunderstood your question.
Hopefully some one smarter than me will see this post and reply!
 

Users who are viewing this thread

Back
Top Bottom