XML import nets all null values?

sine80

New Member
Joined
Feb 1, 2011
Messages
8
Greetings all,

I'm working to import via XML files; however, when I do, I receive the structure yet all the values in the tables are null. If I import a second time, I get another set of null values.

I found this article on ms support; however, I'm unable to determine why it seems my document may be attribute centric when it appears element centric (as indicated my ms as being required.)

Here's a sample of my XML. If I try to import, everything is blank...

Any ideas?

HTML:
<ROOT>
<Level1>
<ReportTime>
09:15
</ReportTime>
<REPORT_ID>
A1
</REPORT_ID>
<GROUP_ID>
10
</GROUP_ID>
<DATE>
11/10/11
</DATE>
<Level2>
<PERNO>
12345
</PERNO>
</Level2>
</Level1>
</ROOT>
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I think xml sees all white space - including new lines
so when you import this
HTML:
<ReportTime>
09:15
</ReportTime>

you actually really did import 09:15
but you imported newline09:15newline

so the data is not null, it is there, but you're seeing the newlines - the database has essentially "scrolled" past the 09:15 and is not displaying it

if you query your table and use the len function to select the length of each field you'll see the length is longer than you think it is
that extra length is the newline characters

you can try putting the tags right after the data, that might work
 
Upvote 0

Forum statistics

Threads
1,214,605
Messages
6,120,476
Members
448,967
Latest member
visheshkotha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top