A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

load data into word table or tabular form automatically from XML



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2004, 07:49 AM
Alex
external usenet poster
 
Posts: n/a
Default load data into word table or tabular form automatically from XML

I have some data in a very simple XML file,

I want a simple & easy way to load this into a Table in Word document.
(which will automatically add the required number of rows into this table).
Basically i want to be free of any code which has to do with adding rows &
setting the values.
I dont mind having a complex, but generic way of plugging this data into a
table in Work Document.

Is there such a way to achieve this (To populate data in a Table or at least
tabular form in a Word Document)???

Sample XML data.

AdrBook
row
NameAlex/Name
age14/age
/row
row
NameAlex 2/Name
age24/age
/row
row
NameAlex3/Name
age35/age
/row
/AdrBook




  #2  
Old July 9th, 2004, 02:21 PM
Kathleen
external usenet poster
 
Posts: n/a
Default load data into word table or tabular form automatically from XML

If you can do a bit of programming, you can do this
relatively easily using Find & Replace (and a loop or
Case statement to do the repetitious processing). I have
simplified the details, but basically you need to follow
the steps below.
1. Work out what your table headings should be from the
open tags, e.g. Name becomes Name and Age becomes
Age. Build up the first row of the table with tab
separators, eg.,
Name^tAge^p (^t is a tab, ^p is a paragraph marker)
2. Change the tags in the middle into a tab marker so it
looks like this:
AdrBookrow
Name^tAge^p
NameAlex^t14/age
/row

You can do that by searching for /name*age and
replacing it with nothing, but the syntax is more
complicated than that (you have to stick / or \
characters [I can't remember which offhand] in front of
the special characters). Open up the Help file and learn
about how to do Find & Replace with Wildcards. You'll
need to practice this.

3. Then, delete all the other tags except for the two
AdrBook tag until it looks like this:
AdrBook
Name^t^Age^p
Alex^t14^p
Alex 2^t24^p
/AdrBook

4. Select everything within the AdrBook tags and
convert Table to text using tabs.

5. Format the table and delete the AdrBook tags.


-----Original Message-----
I have some data in a very simple XML file,

I want a simple & easy way to load this into a Table in

Word document.
(which will automatically add the required number of

rows into this table).
Basically i want to be free of any code which has to do

with adding rows &
setting the values.
I dont mind having a complex, but generic way of

plugging this data into a
table in Work Document.

Is there such a way to achieve this (To populate data in

a Table or at least
tabular form in a Word Document)???

Sample XML data.

AdrBook
row
NameAlex/Name
age14/age
/row
row
NameAlex 2/Name
age24/age
/row
row
NameAlex3/Name
age35/age
/row
/AdrBook




.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
opening a Form also opens the Word doc the Form data can be merged Jess Using Forms 0 June 21st, 2004 06:52 PM
How to run word and pass a mail merge values and fax it to the recipient Belinda Mailmerge 2 June 13th, 2004 12:49 AM
Data Table Max Worksheet Functions 1 April 12th, 2004 04:12 AM
Linking Excel data through Access to use a Form as an Interface Laura Links and Linking 0 March 23rd, 2004 04:59 PM
Automatically create charts from data table - help needed Gordon Charts and Charting 1 October 20th, 2003 05:49 PM


All times are GMT +1. The time now is 10:32 AM.


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