473,388 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Can't get ImportXML to work

Hi

I have an Access 2000 app where I will soon get an XML file as an input
(of which I already have an early test file), instead of an Excel
spreadsheet. So I set out to see how to import the XML. This seems easy
enough, so I created a new mdb (Access 2003, BTW), added one function
(called by a macro) which reads like this:

Public Function fXMLImport()
Application.ImportXML "P:\ApplDev\VBA-Access\Software\example.xml",
acStructureAndData
End Function

The Application.ImportXML line gives me an error, telling me it can't
find the path, although that path and file name is definitively valid,
I copied it from the Explorer address bar and file name !

Worse, if I take away the path and keep only the file name (the xml
file is in the same dir as the mdb), I get a fatal error "Method
'ImportXML' of object '_Application' failed" !!!

What's going on, and what am I doing wrong ???

What worries me is that the ImportXML help mentions as the data source
"file name and path" instead of "path and file name", but there are of
course no examples with a real path... Is there a special syntax that
escapes me ?

Thanks for your help
Bernard

Oct 11 '06 #1
0 1442

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: The Road To Utopia | last post by:
Here's one for the trolls...a common jibe from them is setting up audio/video hardware under linux. Ok, true story: at work today, someone asked me if I could tell him why his XP Home would play...
119
by: rhat | last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant. Can anyone shed some light on what this will change and it will break stuff as converting HTML to XHTML pages DO break things. see,...
1
by: Lyle Fairfield | last post by:
I created a new MS-SQL Database, "TestODBC". I made Table1 and StoredProcedure1. I made an ODBC DSN for that MS-SQL Database. I created a new AccessXP mdb, "TestODBC". I linked to the...
3
by: Trev | last post by:
A2K2 If I use: Application.ImportXML "MyFile.XML", acStructureAndData I get a table in my database, not ncessarily called "MyFile". So without building an array of tables then comparing...
6
by: bcanavan | last post by:
Given a small number(maybe 4-5) of simulataneous remote users, can an app be run to provide "live" snapshot reports to snapviewer? If so, 1. Does the app have to run continuously? (I would...
4
by: nepifanio | last post by:
Hi Guys, I'm trying to import data out of MySQL db to MS Access 2003 using ImportXML. I don't have any problems doing the import, except for one table with a "text" field defined. I'm getting...
1
by: Jim | last post by:
I run the following code Application.ImportXML _ DataSource:="C:\TEMP\Audit\BatchData\BatchHeader.xml", _ ImportOptions:=acAppendData And get the error 'Path not found:...
0
by: BenWeber | last post by:
I have XML formed as follows (this is just a part of the XML) - <players> - <player id="814090"> <name>Brian</name> <surname>Bradford</surname> <countryfrom id="4">USA</countryfrom>...
3
by: heinzW | last post by:
Hallo, ich schreibe ein VB-Programm, das eine MDB-Datei verwendet. Weiß jemand, ob für die beiden Funktionen ExportXML und ImportXML Access installiert sein muss, da dies bei unserem Kunden nicht...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.