carbontracking
carbontracking

Reputation: 1089

How to create a report, as a Word document, from data in a Sharepoint list

I have a sharepoint list that is used to record weekly activity, e.g. four columns for weeknumber, projectname, customername, comment

I'd like to be able to generate a report containing all the data for a particular week in the following format

I can do this by exporting the list to an Excel file and then writing some VBA to generate a Word Document, but I'm wondering if there is any way to cut out the Excel step.

Upvotes: 0

Views: 3856

Answers (3)

Rikard Pavelic
Rikard Pavelic

Reputation: 496

There is nice example on Github (FoodOrder) on how to do it with Templater.

As author I highly recommend it ;)

Upvotes: 0

Ryan
Ryan

Reputation: 24422

So there's two parts to this

a) Getting the data from SharePoint.

b) Converting it into a Word document.

For a) You will probably end up running this remotly (i.e. not on the sharePoint server) as automating office apps on a server is not recommended - so you should look into the SharePoint Web Services to access your data.

For b) You can use - Office Automation (via VBA or C#, VB.NET etc) - Open XML as Pete suggests (Example running in SharePoint) - A commercial component such as Apose The last two will allow you to run your code on the SharePoint server

Upvotes: 1

PeteH
PeteH

Reputation: 2454

Open Xml ?

I found it quite a steep learning curve to get into, but very powerful. I'd suggest that this is a more elegant approach than vba (in that you are dealing with strongly-typed classes) but not necessarily quicker.

Upvotes: 1

Related Questions