View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Marius Bancila Marius Bancila is offline
external usenet poster
 
Posts: 2
Default strange behaviour in Excel 2003 when importing XML

I have noticed a strange behaviour in the import of XML files.

If I have this XML file:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?
<books
  <book
    <titleUbik</title
    <authorPhilip K. Dick</author
  </book

  <book
    <titleDune</title
    <authorFrank Herber</author
  </book
</books
When I open this file in Excel, it creates a row with the element names,
title and author, like this.

title author
Ubik Philip K. Dick
Dune Frank Herber

When I click on title our author I get the combo box tha allows me to sort
the elements. That's exactly what I need. But...

If my XML file has only one element like this:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?
<books
  <book
    <titleUbik</title
    <authorPhilip K. Dick</author
  </book
</books
the file is not imported in the same way, the title and author entries are
missing, the sheet simply looks like this:

Ubik Philip K. Dick

I don't understand what the problem is. Can anyone suggest how to workaround
it so that it shows the title & author row all the time?

Thank you very much,
Marius Bancila