Trying something different this time around and making a video walkthrough, so if you do not want to read, jump to the end and check out the video. I want to make more videos of these solution walkthrough and if you find them useful or helpful, let me know!
There are certainly multiple ways to approach this (and I will cover more in the future), but this approach will detail how to get repeating section data from a Nintex Workflow Cloud form into an existing Excel file using the Insert table data action. Let’s jump in! For this, I am going to keep it simple and have a form with just two (2) controls within my repeating section; first name and last name.
The Excel file I am going to push this data into is stored in my OneDrive and is already setup with a table (Table 1) that has two columns; first name and last name. As you can imagine, we are going to take the repeating data from the form and write it to the corresponding cells in our Excel file.
The actions required to get the data into Excel are only Loop for each and Insert table data. That’s it! So let’s breakdown each action and see how we get the data in proper cell.
First the Loop for each action. This is simple enough if you have worked with loops or data collections before, but what we are doing here is iterating through each item in our target collection, the repeating section in this scenario.
Second, the Insert table data action is where we will set where the data is going. For this action we will need to select our connection to the Excel file. For more information on how to create a connection, check out the Nintex help files. Once a connection has been made, you can select the file you want to write the data to, RepeatingSectionTemplate.xlsx is what I am using, and then select the table where the data is going. Assuming you are going to start inserting the data in the first row, we can use the loop index to help determine where the data goes each time we loop through it. If you are starting on a different row, you will need to offset the index variable by that number of rows.
Lastly, we will need to set the data points for each of the cells within the row. To do this, we select the first name and last name variables from the Current item within the Loop for each object when inserting our variables.
With everything in place, we can now push our repeating section data that we captured in the form into the Excel file. Here is a quick look at our end result:
As always, there are many ways to accomplish this, but with Nintex, creating a viable solution is easy and fast. Next time I will cover how to accomplish this using document generation and create a new Excel file each time rather than write into an existing one. Until next time!