Results 1 to 3 of 3
  1. #1
    JohanG is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Posts
    14

    VBA to Transform and Import XML Files in MS Access Tables


    Greetings Experts,

    I am cycling through a directory containing .xml files which I then import into tables making use of the
    Application.ImportXML method. However, not all data within each .xml file are being imported. After
    some searching I discovered that the mentioned method I am using only imports "element-centric content" and
    not "attribute-centric content".

    There are suggestions the the .xml files must be transformed to move attributes to elements with "XLST" (Don't know what that is?) prior
    to importing the data.

    I am fairly experienced with MS Access VBA; but have no experience when it comes to the importing of .xml files and
    how to do the abovementioned/suggested transformation.

    Any assistance (hopefully with sample code) would be hugely welcomed and appreciated. I have attached one of the .xml
    files as reference as well as the Access Tables generated via the abovementioned method. You will notice that there are a significant
    amount of data in the .xml file that's not being imported into the Access Tables.

    Thanking you for your time.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I found this example via Google, but have not done any transforming.

  3. #3
    JohanG is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2022
    Posts
    14
    Quote Originally Posted by orange View Post
    I found this example via Google, but have not done any transforming.

    Thank you "Orange" for the feedback; I will have a look to see if I can apply that code.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-10-2019, 11:39 AM
  2. Replies: 10
    Last Post: 06-16-2014, 08:37 AM
  3. Replies: 5
    Last Post: 02-12-2014, 12:13 PM
  4. Import multiple files from one location to new tables
    By shmalex007 in forum Import/Export Data
    Replies: 1
    Last Post: 01-05-2012, 03:49 AM
  5. Replies: 3
    Last Post: 08-29-2011, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums