Share via

Cannot create xml table in Excel 2010 with 2003 xml tools add-in

Anonymous
2010-10-07T18:19:11+00:00

I downloaded and installed the Excel xml tools add-in according to the instructions inhttp://office.microsoft.com/en-us/excel-help/create-an-xml-data-file-and-xml-schema-file-from-worksheet-data-HA010342365.aspx andhttp://www.microsoft.com/downloads/en/details.aspx?FamilyId=72852247-6AFD-425C-83B1-1F94E4AC2775&displaylang=en.  When I run the add-in by trying to convert a range to an xml table, I get the following message:"compile error: user-defined type not defined", and the process stops.

I need to do this to be able to save the resulting xml table as an xml file and in turn import it into another application.  Please help, I desperately need this to work.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2010-11-25T14:34:02+00:00

    When the error is displayed msxml2.DOMDocument50 variable, you have to do is delete the number 50 and leave only msxml2.DOMDocument. Press the F5 key to continue exploring the compiler errors and each occurrence of this variable will delete the number. Then show the table you need to export to XML.

    40+ people found this answer helpful.
    0 comments No comments

15 additional answers

Sort by: Most helpful
  1. Anonymous
    2014-06-05T20:03:18+00:00

    Never mind! For anyone coming to this page and trying to use this add-in with Excel 2013:

    1. Load the add-in like normal within Excel and run it
    2. When the compiler error appears stating that the user-defined type is not defined (what wonderful wording by the way)
    3. Each reference to msxml2.DOMDocument
    4. Must be replaced with
    5. msxml2.DOMDocument60

    Blammo! It works.

    Normally, I assume, you could just add a reference to fix this but alas, this add-in is approaching 14 years of age and still has a password set on it. I'm sure there's a way around that but this will do in a pinch.

    Good luck to you all.

    10+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-09-22T23:09:20+00:00

    I know this answer is a little late, but this worked for me:

    When you receive the message "Compile error: user-defined type not defined" or "Error de compilación: no se ha definido el tipo definido por el usuario"  do the following:

    • Press OK
    • Right click over msxml2. Choose Definition. This will show the object browser, with all the classes in MSXML2.
    • In the list, look for DOMDocumentxx, where xx may be a number or may not exist. In my case, xx was 60, and DOMDocument60 was at the top of the list.
    • In the Window menu, choose XmlTools.xla - CreateXmlFiles, to go back to the code.
    • Replace 50 by the number (xx) you found.
    • Press F5. Replace 50 by the number (xx). Repeat this step until you don't get error messages.

    After that I got my range converted to an XML list.

    Hope this will help.

    6 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-10-08T03:46:48+00:00

    One alternative is to import your excel data into Access, then export it into XML.

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2017-02-10T16:25:06+00:00

    por favor envíame el archivo al correo ******@gmail.com

    1 person found this answer helpful.
    0 comments No comments