One of the main things you will see in a report is a bunch
of tables. The best way of getting this data in my world is by putting it into
a dataframe and then putting this dataframe into word. Again you will probably
find solutions on stack-overflow as to the best way to do this and below you
will find some code that I have used for this purpose.
The basic steps to do this are:
- Get the data, whether from a CSV or your database, in this case I have decided to use my database to get the information. This goes into a dataframe.
- Prepare the word document
- Insert the data
The code to do this, of course with comments, is shown
below and the document this produces is shown here.
The code:
Your Awesome brother, you have saved my Ass tonight
ReplyDelete