Solved

download livelink document to access table

Posted on 2014-09-18
5
343 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum Multiple Columns in Access Query 5 48
Reset Active Directory Password via MS Access 9 52
ms/access hyperlink/ftp 7 35
Track name AutoCorrect info 14 46
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

911 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

17 Experts available now in Live!

Get 1:1 Help Now