Solved

download livelink document to access table

Posted on 2014-09-18
5
342 Views
Last Modified: 2014-09-18
I am trying to download a livelink document, which presents as an Excel format, into an Access table.

When I run the code below, once the table is found, I am presented with the following error message - "database does not suport HTML pages".  I have no idea what this error means or how to fix it.  

My simple test code is as follows:

Sub getData()

   Dim strFileName$
   
 strFileName = "http://docweb.company.com/doc/livelink/Contact%20List?func=docfetcher.fetchdoc&nodeid=582331501"
   
 DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "tmpContact", strFileName, True

End Sub

Is the docmd.transferspreadsheet method what I should be using?  Or, should I be using something else - if so, what?
0
Comment
Question by:uad
  • 2
  • 2
5 Comments
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 200 total points
ID: 40331419
I've run into this before with downloaded Excel files. I've had to open them in Excel and save them as standard Excel files before the Import would work, so you'd have to change your process to :

1. Download the file
2. OPen the file in excel and Save it as a standard Excel file
3. Then run your process.

Perhaps another Expert has a a different way, however ...
0
 

Author Comment

by:uad
ID: 40331551
Ok - not what I wanted to hear.

I do have an Excel macro that will call and save the file, but is there a way to create an access module to call this excel macro?
0
 
LVL 84
ID: 40331555
You could automate Excel, and then run that macro I assume, but I have no experience with doing that.
0
 
LVL 12

Accepted Solution

by:
danishani earned 300 total points
ID: 40331646
You can use the Excel Object within Microsoft Access and run the procedure (macro) you have written.

 Dim XL As Object
 Set XL = CreateObject("Excel.Application")
 XL.Workbooks.Open "YourPathandFileNameHere"
 ...
 'Then put here all your further stuff you want to run

Open in new window


Then when the macro is finished you can import the Excel file (assuming that's the format you save it in) with the DoCmd.TransferSpreadSheet() command.

Hope this helps,
0
 

Author Closing Comment

by:uad
ID: 40331665
Split point since I need both solutions for the end result
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now