PC Review


Reply
Thread Tools Rate Thread

Can I import xls data to Access over http using vb?

 
 
Robin
Guest
Posts: n/a
 
      21st Apr 2006
Hi

I'm developing an Access App which pulls data from various sources and
compiles summary reports. Some of the data sources are Excel files on
network folders and I can use "DoCmd.TransferSpreadsheet acImport" to import
these to a table. However, some of the sources are Excel files on internal
SharePoint sites, and have an http://.... address.

Is there a VBA method for importing data over http? I've obviously tried
"DoCmd.TransferSpreadsheet acImport" but this generates an error: 3651 -
invalid internet address.

Many thanks

Robin


 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      21st Apr 2006
Hi,
suggest that you first download excel file using this API:
http://www.mvps.org/access/modules/mdl0037.htm
and then import it from local drive

--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

"Robin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I'm developing an Access App which pulls data from various sources and
> compiles summary reports. Some of the data sources are Excel files on
> network folders and I can use "DoCmd.TransferSpreadsheet acImport" to
> import these to a table. However, some of the sources are Excel files on
> internal SharePoint sites, and have an http://.... address.
>
> Is there a VBA method for importing data over http? I've obviously tried
> "DoCmd.TransferSpreadsheet acImport" but this generates an error: 3651 -
> invalid internet address.
>
> Many thanks
>
> Robin
>


 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      21st Apr 2006
Thanks Alex.

The code (and your suggestion to download to a local drive) makes perfect
sense - the API addin, I'm less sure about just through my lack of
knowledge.

Once imported, does the addin remain embedded in the application on
distribution or would this need to be added for each user? If it needs to
be added for each user I might need to seek an alternative solution.

Thanks again,

Robin


"Alex Dybenko" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> suggest that you first download excel file using this API:
> http://www.mvps.org/access/modules/mdl0037.htm
> and then import it from local drive
>
> --
> Best regards,
> ___________
> Alex Dybenko (MVP)
> http://alexdyb.blogspot.com
> http://www.PointLtd.com
>
> "Robin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> I'm developing an Access App which pulls data from various sources and
>> compiles summary reports. Some of the data sources are Excel files on
>> network folders and I can use "DoCmd.TransferSpreadsheet acImport" to
>> import these to a table. However, some of the sources are Excel files on
>> internal SharePoint sites, and have an http://.... address.
>>
>> Is there a VBA method for importing data over http? I've obviously tried
>> "DoCmd.TransferSpreadsheet acImport" but this generates an error: 3651 -
>> invalid internet address.
>>
>> Many thanks
>>
>> Robin
>>

>



 
Reply With Quote
 
Douglas J Steele
Guest
Posts: n/a
 
      21st Apr 2006
The add-in would need to be added for each user.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Robin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Alex.
>
> The code (and your suggestion to download to a local drive) makes perfect
> sense - the API addin, I'm less sure about just through my lack of
> knowledge.
>
> Once imported, does the addin remain embedded in the application on
> distribution or would this need to be added for each user? If it needs to
> be added for each user I might need to seek an alternative solution.
>
> Thanks again,
>
> Robin
>
>
> "Alex Dybenko" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > suggest that you first download excel file using this API:
> > http://www.mvps.org/access/modules/mdl0037.htm
> > and then import it from local drive
> >
> > --
> > Best regards,
> > ___________
> > Alex Dybenko (MVP)
> > http://alexdyb.blogspot.com
> > http://www.PointLtd.com
> >
> > "Robin" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Hi
> >>
> >> I'm developing an Access App which pulls data from various sources and
> >> compiles summary reports. Some of the data sources are Excel files on
> >> network folders and I can use "DoCmd.TransferSpreadsheet acImport" to
> >> import these to a table. However, some of the sources are Excel files

on
> >> internal SharePoint sites, and have an http://.... address.
> >>
> >> Is there a VBA method for importing data over http? I've obviously

tried
> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:

3651 -
> >> invalid internet address.
> >>
> >> Many thanks
> >>
> >> Robin
> >>

> >

>
>



 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      21st Apr 2006
Ok, many thanks Doug.

I've been wondering if there might be a COM alternative that doesn't need an
add-in, such as using Excel as an intermediary to open the remote file and
save it locally, or possibly use of DDE to extract the file content from
Excel. I need to do some investigation.

Regards,

Robin


"Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> The add-in would need to be added for each user.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Robin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Thanks Alex.
>>
>> The code (and your suggestion to download to a local drive) makes perfect
>> sense - the API addin, I'm less sure about just through my lack of
>> knowledge.
>>
>> Once imported, does the addin remain embedded in the application on
>> distribution or would this need to be added for each user? If it needs
>> to
>> be added for each user I might need to seek an alternative solution.
>>
>> Thanks again,
>>
>> Robin
>>
>>
>> "Alex Dybenko" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi,
>> > suggest that you first download excel file using this API:
>> > http://www.mvps.org/access/modules/mdl0037.htm
>> > and then import it from local drive
>> >
>> > --
>> > Best regards,
>> > ___________
>> > Alex Dybenko (MVP)
>> > http://alexdyb.blogspot.com
>> > http://www.PointLtd.com
>> >
>> > "Robin" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Hi
>> >>
>> >> I'm developing an Access App which pulls data from various sources and
>> >> compiles summary reports. Some of the data sources are Excel files on
>> >> network folders and I can use "DoCmd.TransferSpreadsheet acImport" to
>> >> import these to a table. However, some of the sources are Excel files

> on
>> >> internal SharePoint sites, and have an http://.... address.
>> >>
>> >> Is there a VBA method for importing data over http? I've obviously

> tried
>> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:

> 3651 -
>> >> invalid internet address.
>> >>
>> >> Many thanks
>> >>
>> >> Robin
>> >>
>> >

>>
>>

>
>



 
Reply With Quote
 
Douglas J Steele
Guest
Posts: n/a
 
      21st Apr 2006
You could always simply include the necessary code from the add-in as a
module in your application.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Robin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Ok, many thanks Doug.
>
> I've been wondering if there might be a COM alternative that doesn't need

an
> add-in, such as using Excel as an intermediary to open the remote file and
> save it locally, or possibly use of DDE to extract the file content from
> Excel. I need to do some investigation.
>
> Regards,
>
> Robin
>
>
> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
> news:(E-Mail Removed)...
> > The add-in would need to be added for each user.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no e-mails, please!)
> >
> >
> > "Robin" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> >> Thanks Alex.
> >>
> >> The code (and your suggestion to download to a local drive) makes

perfect
> >> sense - the API addin, I'm less sure about just through my lack of
> >> knowledge.
> >>
> >> Once imported, does the addin remain embedded in the application on
> >> distribution or would this need to be added for each user? If it needs
> >> to
> >> be added for each user I might need to seek an alternative solution.
> >>
> >> Thanks again,
> >>
> >> Robin
> >>
> >>
> >> "Alex Dybenko" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Hi,
> >> > suggest that you first download excel file using this API:
> >> > http://www.mvps.org/access/modules/mdl0037.htm
> >> > and then import it from local drive
> >> >
> >> > --
> >> > Best regards,
> >> > ___________
> >> > Alex Dybenko (MVP)
> >> > http://alexdyb.blogspot.com
> >> > http://www.PointLtd.com
> >> >
> >> > "Robin" <(E-Mail Removed)> wrote in message
> >> > news:(E-Mail Removed)...
> >> >> Hi
> >> >>
> >> >> I'm developing an Access App which pulls data from various sources

and
> >> >> compiles summary reports. Some of the data sources are Excel files

on
> >> >> network folders and I can use "DoCmd.TransferSpreadsheet acImport"

to
> >> >> import these to a table. However, some of the sources are Excel

files
> > on
> >> >> internal SharePoint sites, and have an http://.... address.
> >> >>
> >> >> Is there a VBA method for importing data over http? I've obviously

> > tried
> >> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:

> > 3651 -
> >> >> invalid internet address.
> >> >>
> >> >> Many thanks
> >> >>
> >> >> Robin
> >> >>
> >> >
> >>
> >>

> >
> >

>
>



 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      21st Apr 2006
Ah - a nugget of wisdom! Didn't think of that. Of course!

I'm a bit of a beginner in this whole API area but it sounds straightforward
enough (maybe naive on my part). I'll try it and report back.

Many thanks Doug!

Regards

Robin

"Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> You could always simply include the necessary code from the add-in as a
> module in your application.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Robin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Ok, many thanks Doug.
>>
>> I've been wondering if there might be a COM alternative that doesn't need

> an
>> add-in, such as using Excel as an intermediary to open the remote file
>> and
>> save it locally, or possibly use of DDE to extract the file content from
>> Excel. I need to do some investigation.
>>
>> Regards,
>>
>> Robin
>>
>>
>> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
>> news:(E-Mail Removed)...
>> > The add-in would need to be added for each user.
>> >
>> > --
>> > Doug Steele, Microsoft Access MVP
>> > http://I.Am/DougSteele
>> > (no e-mails, please!)
>> >
>> >
>> > "Robin" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Thanks Alex.
>> >>
>> >> The code (and your suggestion to download to a local drive) makes

> perfect
>> >> sense - the API addin, I'm less sure about just through my lack of
>> >> knowledge.
>> >>
>> >> Once imported, does the addin remain embedded in the application on
>> >> distribution or would this need to be added for each user? If it
>> >> needs
>> >> to
>> >> be added for each user I might need to seek an alternative solution.
>> >>
>> >> Thanks again,
>> >>
>> >> Robin
>> >>
>> >>
>> >> "Alex Dybenko" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Hi,
>> >> > suggest that you first download excel file using this API:
>> >> > http://www.mvps.org/access/modules/mdl0037.htm
>> >> > and then import it from local drive
>> >> >
>> >> > --
>> >> > Best regards,
>> >> > ___________
>> >> > Alex Dybenko (MVP)
>> >> > http://alexdyb.blogspot.com
>> >> > http://www.PointLtd.com
>> >> >
>> >> > "Robin" <(E-Mail Removed)> wrote in message
>> >> > news:(E-Mail Removed)...
>> >> >> Hi
>> >> >>
>> >> >> I'm developing an Access App which pulls data from various sources

> and
>> >> >> compiles summary reports. Some of the data sources are Excel files

> on
>> >> >> network folders and I can use "DoCmd.TransferSpreadsheet acImport"

> to
>> >> >> import these to a table. However, some of the sources are Excel

> files
>> > on
>> >> >> internal SharePoint sites, and have an http://.... address.
>> >> >>
>> >> >> Is there a VBA method for importing data over http? I've obviously
>> > tried
>> >> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:
>> > 3651 -
>> >> >> invalid internet address.
>> >> >>
>> >> >> Many thanks
>> >> >>
>> >> >> Robin
>> >> >>
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      21st Apr 2006
Wow - it works!

After saying it seemed relatively simple, when I looked at the task
initially I thought this was all too much for a relative beginner. I fell
at the first hurdle when the calling sub does:

Dim objHTTP As InetTransferLib.HTTP

There was no InetTransferLib object of course. Then I realised the Library
code needed to be in a Class Module and it all fell into place!

(Shame about the pop-up, but I understand the logic and etiquette.)

Thank you very much Doug (and to Dev Ashish and Terry Kreft or course).

Regards,

Robin
"Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> You could always simply include the necessary code from the add-in as a
> module in your application.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Robin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Ok, many thanks Doug.
>>
>> I've been wondering if there might be a COM alternative that doesn't need

> an
>> add-in, such as using Excel as an intermediary to open the remote file
>> and
>> save it locally, or possibly use of DDE to extract the file content from
>> Excel. I need to do some investigation.
>>
>> Regards,
>>
>> Robin
>>
>>
>> "Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
>> news:(E-Mail Removed)...
>> > The add-in would need to be added for each user.
>> >
>> > --
>> > Doug Steele, Microsoft Access MVP
>> > http://I.Am/DougSteele
>> > (no e-mails, please!)
>> >
>> >
>> > "Robin" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> >> Thanks Alex.
>> >>
>> >> The code (and your suggestion to download to a local drive) makes

> perfect
>> >> sense - the API addin, I'm less sure about just through my lack of
>> >> knowledge.
>> >>
>> >> Once imported, does the addin remain embedded in the application on
>> >> distribution or would this need to be added for each user? If it
>> >> needs
>> >> to
>> >> be added for each user I might need to seek an alternative solution.
>> >>
>> >> Thanks again,
>> >>
>> >> Robin
>> >>
>> >>
>> >> "Alex Dybenko" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Hi,
>> >> > suggest that you first download excel file using this API:
>> >> > http://www.mvps.org/access/modules/mdl0037.htm
>> >> > and then import it from local drive
>> >> >
>> >> > --
>> >> > Best regards,
>> >> > ___________
>> >> > Alex Dybenko (MVP)
>> >> > http://alexdyb.blogspot.com
>> >> > http://www.PointLtd.com
>> >> >
>> >> > "Robin" <(E-Mail Removed)> wrote in message
>> >> > news:(E-Mail Removed)...
>> >> >> Hi
>> >> >>
>> >> >> I'm developing an Access App which pulls data from various sources

> and
>> >> >> compiles summary reports. Some of the data sources are Excel files

> on
>> >> >> network folders and I can use "DoCmd.TransferSpreadsheet acImport"

> to
>> >> >> import these to a table. However, some of the sources are Excel

> files
>> > on
>> >> >> internal SharePoint sites, and have an http://.... address.
>> >> >>
>> >> >> Is there a VBA method for importing data over http? I've obviously
>> > tried
>> >> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:
>> > 3651 -
>> >> >> invalid internet address.
>> >> >>
>> >> >> Many thanks
>> >> >>
>> >> >> Robin
>> >> >>
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      25th Apr 2006
Having spent an age solving this using the "InetTransferLib" add-in, a
colleague has today pointed out the equivalence of:

http://SomeServer/SomeFolder/SomeFile

and

\\SomeServer\SomeFolder\SomeFile

.... for internal SharePoint sites (which is what I was trying to access). I
can now go back to the original "DoCmd.TransferSpreadsheet acImport" option
and dump the Class Module! This also allows me to continue using
FileSystemObject DateLastModified (which I couldn't do using the HTTP Class
Module).

Wisdom is a wonderful thing :-)

R

"Douglas J Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:(E-Mail Removed)...
> You could always simply include the necessary code from the add-in as a
> module in your application.
>
> to
>> >> >> import these to a table. However, some of the sources are Excel

> files
>> > on
>> >> >> internal SharePoint sites, and have an http://.... address.
>> >> >>
>> >> >> Is there a VBA method for importing data over http? I've obviously
>> > tried
>> >> >> "DoCmd.TransferSpreadsheet acImport" but this generates an error:
>> > 3651 -
>> >> >> invalid internet address.
>> >> >>
>> >> >> Many thanks
>> >> >>
>> >> >> Robin



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import new data and replace old data in Access table. TBui Microsoft Access External Data 4 29th May 2009 04:19 PM
Import new data and replace old data in Access table. TBui Microsoft Access External Data 0 29th May 2009 03:21 AM
Memo format field data problem - Data import from Access database AFSSkier Microsoft Excel Programming 0 29th Apr 2009 05:51 PM
import xml data into Access 2003 - deletes all data in file =?Utf-8?B?TGFycnlAVVNEQQ==?= Microsoft Access External Data 1 26th May 2006 07:18 PM
Import Data From Access to Excel - Return Modified Data To Access HVG Microsoft Access External Data 0 9th Dec 2005 08:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:44 PM.