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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 03:59 PM |
Automatically create charts from data table - help needed | Gordon | Charts and Charting | 1 | October 20th, 2003 05:49 PM |