ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   strange behaviour in Excel 2003 when importing XML (https://www.excelbanter.com/excel-discussion-misc-queries/115311-strange-behaviour-excel-2003-when-importing-xml.html)

Marius Bancila

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

Marius Bancila

strange behaviour in Excel 2003 when importing XML
 
Doesn't anyone have an idea about a workaround, other than inserting a dummy
element?


All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com