Link/Import SharePoint Excel File (1 Viewer)

dbalargin

Member
Joined
Dec 31, 2002
Messages
39
I need to link or import an Excel file that is on a SharePoint site. When I use the "Import Excel Spreadsheet" wizard in Access and populate the path to the SharePoint file I get an error stating "Only XML files can be imported from an Internet address (http://, ftp://). Enter a path that points to a location on your computer or on the network.)

How can I link or import an Excel file that is on a SharePoint site?
 

smiler44

Registered User
Joined
Jul 15, 2008
Messages
637
this is a few years old but I know it worked for me at work. this will download a file from sharepoint. you will need the full path of the file you want to download



Option Explicit
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" ( _
ByVal pCaller As Long, ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

Sub DownloadFileFromWeb()
Dim i As Integer

Const strUrl As String = "url and file name with extension of file you want to down load"
Dim strSavePath As String
Dim returnValue As Long

strSavePath = "path and file name with extension of where you want to save the file"
returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0)

End Sub

smiler44
 

dbalargin

Member
Joined
Dec 31, 2002
Messages
39
Great! Thanks smiler44!! I'll try this and let you know.


this is a few years old but I know it worked for me at work. this will download a file from sharepoint. you will need the full path of the file you want to download



Option Explicit
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" ( _
ByVal pCaller As Long, ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

Sub DownloadFileFromWeb()
Dim i As Integer

Const strUrl As String = "url and file name with extension of file you want to down load"
Dim strSavePath As String
Dim returnValue As Long

strSavePath = "path and file name with extension of where you want to save the file"
returnValue = URLDownloadToFile(0, strUrl, strSavePath, 0, 0)

End Sub

smiler44
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom