Convert XLS to XML

Posted on 2009-04-21
Last Modified: 2012-05-06
I need to convert a list of address to XML format, but I need the data formatted in a specific way. I need each row in the attached spreadsheet converted to XML format below.













					<BusinessAddress1><![CDATA[<br />]]><![CDATA[<br />]]></BusinessAddress1>













Open in new window

Question by:ksa1016
    LVL 10

    Accepted Solution

    I don't know which version of Excel you are using, but take a look at this site:

    It explain how to define your schema file (XSD)

    But if you don't have one of theses versions, i think you will have to write some VBA...
    - Microsoft Office Professional Edition 2003 (R, P, V, A, S)
    - Microsoft Office Professional Enterprise Edition 2003 (includes InfoPath)(V)
    - Microsoft Excel 2003 (R)(The stand-alone Excel box is considered to be professional)

    Author Comment

    I might be missing something...but that doesn't show how to bring an XLS into a format with new data. I need to create a new XML from the spreadsheet.
    LVL 10

    Expert Comment

    In my version of Excel, i can simply do a SAVE AS (under FILE menu), and choose the file type XML.
    But i don't know if in the most advanced version there's some additionnal popup  to let you choose an XSD file to properly format your XML file.  The help i can give you about this problem is quite limited.

    All i could do is to write some VBA to do that.

    I'll let other people answer, and if you are still stuck, just post a comment to ask for my help and i'll write you few lines to save it in XML.
    LVL 10

    Expert Comment

    Have you found your solution?  Or still need some VBA to translate it to XML?

    Author Comment

    Your link helped me figure it out. I transformed the XLS data into XML. Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 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

    10 Experts available now in Live!

    Get 1:1 Help Now