A table in a text file is quite simple as you just decide how long each field should be and ensure you fill out each line of text with the appropriate number of spaces, to end up with something like:
==========+==============+===================
| field 1 | field 2 | field three |
==========+==============+===================
| field N | field N+1 | field N+2 |
==========+==============+===================
However, creating a Word document is less easy as you need to use some library which will do all the hard work of formatting your data into the structures required by Microsoft Office;
here[
^] are some possible options.