Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating a word report and all my data is on an excel sheet. The sheet is like this:

ID Name1 Name2 Name3 Name4
1  blah  blah  blah  blah
2  blah  blah  blah  blah
3  blah  blah  blah  blah

And what I want is in the word document, to have one table for each line of the worksheet like this:

|ID     |1   |
|Name1: |blah|
|Name2: |blah|
|Name3: |blah|
|Name4: |blah|

|ID     |2   |
|Name1: |blah|
|Name2: |blah|
|Name3: |blah|
|Name4: |blah|


I think that this should be pretty straight forward, but unfortunatelly I've never done something like that before.

Any ideas/pointers on how ti can be done are welcome!

share|improve this question
You've used the 'vba' and 'export' tags but have not mentioned them in your question. Are you asking for a VBA Export solution? – CharlieRB Dec 19 '11 at 21:15
@CharlieRB I'm asking for any solution - thought that vba may be involved but not sure. – frustrated_geoge Dec 19 '11 at 21:26
up vote 0 down vote accepted

It's easiest to reformat the data in Excel and then just copy and paste from there. For example, if you copy your table and then do a Paste Special and select the Transpose option, it will paste as:

ID     1     2     3     4 
Name1  blah  blah  blah  blah 
Name2  blah  blah  blah  blah
Name3  blah  blah  blah  blah
Name4  blah  blah  blah  blah

which will make your copy and paste a bit simpler (just select the columns you want to copy (or grab the whole table and delete the columns you don't want).

share|improve this answer
The thing is that a simple copy is not enough - I'd like each produced table to be pretty-formated, e.g. to create a template of how it should look, and the run a script to create multiple tables like that, each with data from another row. – frustrated_geoge Dec 19 '11 at 21:29
How many tables are you doing? It may be simpler to get the data into Word and then use a Table Style to format them one by one, rather than trying to do it programmatically. – Rhys Gibson Dec 19 '11 at 21:45
There are about 200 or something similar, not sure yet. I'll look into table style, thx for that. Can I customize it as I want? – frustrated_geoge Dec 19 '11 at 21:48
Yep. What version of Word? – Rhys Gibson Dec 19 '11 at 21:50
I'm using office 2010 – frustrated_geoge Dec 19 '11 at 23:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.