The easiest way to do this for Excel is to output your data as comma-separated values, and pop a .csv on the end of the file name. Excel recognizes this format and will tabularize it for you, but be careful about fields with internal whitespace -- Excel may not handle those as you'd expect.
I'm not sure what you mean by Word format. Do you also want a table for that?
------------------
Michael Ernest, co-author of:
The Complete Java 2 Certification Study Guide