Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Excel Macro To Convert XML File


"John" wrote in message
...
I'm trying to convert an XML file into an Excel database using a macro
but don't know where to even start (a newbie if you will).
The XML file format appears as listed below.
What I'd like to get the macro to do is take the headers (ie.
<REPORT_DATE, <DOMAIN_RECORD, <ADDRESS, etc) into proper records &
fields as: Rep_Date, Dom_Rec, Web_Addr,IP_Addr, Owner, Street,
City/State, Country, Phone, Fax, Email, etc
In the case where no info is available, that field would be left
blank.

Any help would be greatly appreciated as I've been trying to find
software to do this but have been unsuccesssful. It appears that a
macro would do the trick.


John


You can download and use the XML parser from the
Microsoft web site and write your own input routines
but I believe Excel 2002 has inbuilt XML export and import
filters to do just this. Upgrading may well be the simplest
option for you.

Keith


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Macro To Convert XML File

I'm trying to convert an XML file into an Excel database using a macro
but don't know where to even start (a newbie if you will).
The XML file format appears as listed below.
What I'd like to get the macro to do is take the headers (ie.
<REPORT_DATE, <DOMAIN_RECORD, <ADDRESS, etc) into proper records &
fields as: Rep_Date, Dom_Rec, Web_Addr,IP_Addr, Owner, Street,
City/State, Country, Phone, Fax, Email, etc
In the case where no info is available, that field would be left
blank.

Any help would be greatly appreciated as I've been trying to find
software to do this but have been unsuccesssful. It appears that a
macro would do the trick.


John


XML File Format:

<?xml version="1.0" encoding="utf-8" ?
<DATA
<REPORT_DATE3-Sep-2003</REPORT_DATE
<DOMAIN_RECORD
<ADDRESShollisterinc.com</ADDRESS
<IP_ADDRESS207.190.246.17</IP_ADDRESS
<OWNERHollister Associates, Inc.
24 School Street
Boston, MA 02108
US</OWNER
<ADMINISTRATIVE_CONTACTKip Hollister -
Hollister Associates, Inc.
24 School Street
Boston, MA 02108
US
Phone - 617-742-3020
Fax - 617-742-3357</ADMINISTRATIVE_CONTACT
<TECHNICAL_CONTACTDNS Admin -

CTC Communications
360 Second Avenue
Waltham, MA 02154
US
Phone - 800-883-6900
Fax -</TECHNICAL_CONTACT
<NAME_SERVERSNS3.CTCCOM.NET 64.69.100.67
NS4.CTCCOM.NET 64.69.100.35</NAME_SERVERS
<ADDITIONAL_DATA<CREATED2001-01-19</CREATED

<UPDATED2001-05-21 16:14:42</UPDATED

<EXPIRES2011-01-19</EXPIRES

<DATASOURCEwhois.bulkregister.com</DATASOURCE</ADDITIONAL_DATA
</DOMAIN_RECORD

<DOMAIN_RECORD
<ADDRESShowtoconquertheworld.com</ADDRESS
<OWNERWASNY, GARRETT
WASNY,GARRETT
SUITE 303-1132
VANCOUVER, BC V6E 1CP
CAN</OWNER
<ADMINISTRATIVE_CONTACTWASNY, GARRETT

WASNY,GARRETT
SUITE 303-1132
VANCOUVER, BC V6E 1CP
CA
604-878-4555</ADMINISTRATIVE_CONTACT
<TECHNICAL_CONTACTSupport, Tech

101 Marietta Street
Atlanta, GA 30303
US</TECHNICAL_CONTACT
<NAME_SERVERSA.NS.INTERLAND.NET 64.226.28.33
B.NS.INTERLAND.NET 69.0.145.33
C.NS.INTERLAND.NET 64.77.127.42</NAME_SERVERS
<ADDITIONAL_DATA<NETNAMEHOWTOCONQUERTHEWORLD-DOM</NETNAME

<CREATED13-Oct-2002</CREATED

<UPDATED2-Sep-2003 17:09:20 EDT</UPDATED

<EXPIRES18-Feb-2008</EXPIRES

<DATASOURCEwhois.networksolutions.com</DATASOURCE</ADDITIONAL_DATA

</DOMAIN_RECORD

</DATA

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Excel Macro To Convert XML File


"John" wrote in message
...
Thanks. I'll check out the MS Parser for now. As for upgrading to
Excel 2002, it's hard to find the cash when you're out of a job.

But I do appreciate the suggestion.


A simpler option may be to use an XSLT stylesheet to display
the XML file in a web browser and then just use cut and paste.

Keith


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Macro To Convert XML File

Well I've checked out the XML Parser - it's way too complex for me to
program it to perform what I need. Guess it's back to Excel Macros


On Thu, 4 Sep 2003 17:01:24 +0100, "Keith Willshaw"
wrote:


"John" wrote in message
.. .
I'm trying to convert an XML file into an Excel database using a macro
but don't know where to even start (a newbie if you will).
The XML file format appears as listed below.
What I'd like to get the macro to do is take the headers (ie.
<REPORT_DATE, <DOMAIN_RECORD, <ADDRESS, etc) into proper records &
fields as: Rep_Date, Dom_Rec, Web_Addr,IP_Addr, Owner, Street,
City/State, Country, Phone, Fax, Email, etc
In the case where no info is available, that field would be left
blank.

Any help would be greatly appreciated as I've been trying to find
software to do this but have been unsuccesssful. It appears that a
macro would do the trick.


John


You can download and use the XML parser from the
Microsoft web site and write your own input routines
but I believe Excel 2002 has inbuilt XML export and import
filters to do just this. Upgrading may well be the simplest
option for you.

Keith


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use macro in Excel 2007 to convert to and email PDF file rick5555 Excel Worksheet Functions 9 November 15th 13 04:39 PM
convert email address file in Excel 2000 to Word file with commas Mike A. Excel Discussion (Misc queries) 8 October 14th 08 02:48 PM
How do I convert an excel file into a comma separated values file Conquerer Excel Discussion (Misc queries) 3 August 17th 06 09:19 PM
How do I convert excel file into ASCII text file with alignment? Rosaiah Excel Discussion (Misc queries) 2 June 27th 05 12:17 PM
How do I increase file limitations to convert a file to Excel? Rastafella Excel Discussion (Misc queries) 1 March 4th 05 03:43 PM


All times are GMT +1. The time now is 07:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"