Go Back   Access World Forums > Apps and Windows > Excel

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-26-2018, 04:28 AM   #1
dbalargin
Member
 
Join Date: Dec 2002
Location: US
Posts: 39
Thanks: 1
Thanked 0 Times in 0 Posts
dbalargin
Link/Import SharePoint Excel File

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?

dbalargin is offline   Reply With Quote
Old 06-26-2018, 10:30 AM   #2
smiler44
Newly Registered User
 
Join Date: Jul 2008
Location: UK
Posts: 637
Thanks: 13
Thanked 9 Times in 8 Posts
smiler44 is on a distinguished road
Re: Link/Import SharePoint Excel File

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
smiler44 is offline   Reply With Quote
The Following User Says Thank You to smiler44 For This Useful Post:
dbalargin (06-26-2018)
Old 06-26-2018, 11:51 AM   #3
dbalargin
Member
 
Join Date: Dec 2002
Location: US
Posts: 39
Thanks: 1
Thanked 0 Times in 0 Posts
dbalargin
Re: Link/Import SharePoint Excel File

Great! Thanks smiler44!! I'll try this and let you know.


Quote:
Originally Posted by smiler44 View Post
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 is offline   Reply With Quote
Reply

Tags
excel , import , sharepoint

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best data link provider to import and link access table into excel Sketchin Excel 8 09-01-2016 10:49 AM
import excel link file iraidotel@yahoo.com Macros 1 01-06-2016 08:18 AM
Import or link an excel file on access db Christian1977 General 1 09-17-2013 12:38 AM
link to an excel file on a sharepoint Le-Bo2d9 Tables 0 10-21-2011 12:47 AM
Import / Link Excel File mugen_rsx Tables 1 04-22-2005 04:30 AM




All times are GMT -8. The time now is 03:41 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World