Protiviti / SharePoint Blog

SharePoint Blog

December 11
Writing Data to Excel from Nintex

​Nintex has some great facilities for reading data from Excel and writing to SharePoint.  But, what if you need to read from SharePoint and update a spreadsheet to send to someone?  There is a lot of information out there on the former, but not so much on the latter.

Call web service is going to be the Action of choice for this task.

The first step to updating a spreadsheet is to use a web service call to get a SessionID for the file.  To do this, create a Single Line of Text variable called SessionID and then drag a call web service action into the workspace and double click it.  Configure the action like below:

The next step is to call the web service action again, but this time use the SetCell web method.  This method allows you to define the sheet name, row and column values as well as the data value as seen below:

The Set Cell Web Service method can be called as many times as necessary to complete updates to a spreadsheet.  There is a method called SetRange that is supposed to allow updates to multiple cells in one call.  Unfortunately, there is very little documentation on this method and I was unable to get it to work.  I tested multiple calls to the SetCell method (about 20) and did not experience degradation in performance.
I plan to continue to research the SetRange method and I will update this blog when I am able to get it working correctly.

Once all of the updates are completed, one final web service call is necessary to close the connection.

That’s all there is to updating a spreadsheet with Nintex!​

Quick Launch

© Protiviti 2021. All rights reserved.   |   Privacy Policy