View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dsuperc Dsuperc is offline
external usenet poster
 
Posts: 8
Default Help me to convert Excel to XML

Try one of these

http://office.microsoft.com/en-us/as...019641033.aspx
http://www.sswug.org/see/20834




"Tim Williams" <saxifrax at pacbell dot net wrote in message ...
Which part are you having a problem with ? Do you require help with
looping through the cells or constructing the XML string?

Assuming all lines have the same structure (ie the same header line) you can
use a "template" and just use replace() to replace tokens with the actual
values.
It would be more difficult to construct it completely from nothing using a
completely generic approach since there is no indication in your example as
to which values are attributes and which are values.

Tim.



"Ivaylo" wrote in message
om...
Hi all,

I need to convert data stored in MS Excel into a .xml file.
Can you help me to create a macro which transforms the following Excel
structure into xml:

1. term|t1|t2|id|defn|abbr|trns|usg|src|syn|see|addre ss|phone
2.

term|T|TE|20|definition|abbreviation|translation|u sage|source|synonym|see
also|address|phone

whe
1. is the header row
2. is a single record
"|" marks the table colums

I need to convert the above structure like this (where "line"
coresponds to a row):

<?xml version="1.0" encoding="UTF-8" ?
- <glossword
- <line
<term t1="T" t2="TE" id="20"term</term
<trsptranscription</trsp
- <defn
<abbrabbreviation</abbr
<trnstranslation</trns
definition
<usgusage</usg
<srcsource</src
<synsynonym</syn
<seesee also</see
<addressaddress</address
<phonephone number</phone
</defn
</line
</glossword

Thank you for all your help

Regards,

Ivaylo