Results 1 to 5 of 5
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Generate XML Maps (2003)

    Hi,

    When I save a W/B as XML, it only allows a save as : XML Spreadsheet where Excel apparently generates an internal map of the sheet. When I try to save as XML Data it does not allow a save as it requires a map to be present in the W/B.

    My question is : How do you create an XML map??? The extension is usually shown as XSD. How do I save or create an XSD file?

    TX
    Regards,
    Rudi

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Generate XML Maps (2003)

    What OFFICE version are you using?

    XML exports are only available in Office Professional or standalone Excel.

    What you do is:

    - First open XML file in Excel, choose the third options you're offered.
    - Excel will inform you it will try to infer a schema to the XML file if it has no reference to an existing schema
    - Map the elements of the XML file to Excel cells
    - import data (or input manually)
    - export the list to XML.

    For a (Dutch) article on this, see: http://www.jkp-ads.com/articles/XMLAndExcel00NL.asp
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Generate XML Maps (2003)

    I am using office proffesional 2003.

    Am I correct in saying that the XSD schema file can only be created with .NET framework tools or via Java Scripting programs?
    Regards,
    Rudi

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Generate XML Maps (2003)

    No, Infopath as a very good tool to create XSD's and Excel can do a pretty good job too. For Excel you need a sample XML file, which incudes all elements that are possible in each node (so the schema isn't missing elements). Import that xml file and you get a schema.

    This code shows you the schema:

    Sub ShowSchema()
    Dim xMap As XmlMap
    Dim xSd As String
    Set xMap = ThisWorkbook.XmlMaps(1)
    xSd = xMap.Schemas(1).xml
    MsgBox xSd
    End Sub
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  5. #5
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Generate XML Maps (2003)

    Hi all,

    I was following up on XML the other day and came across these handy articles. They are guided tours of XML Mapping and shows you compete lessons on using XML maps in Excel 2003.

    See:
    MS Lessons on using XML in Excel 2003
    Also, for more detailed explanations and examples see:
    XML for the uninitiated
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •