Need help adding rows dynamically to data table in Excel using 6 variables from 2 spreadsheets and 1 from browser

I have some questions. As stated in the title, I need to be able to add information from 3 sources (2 spreadsheets from the same workbook, and 1 from the browser) into one row on a pre-made excel workbook, dynamically.
I started off by creating the variables needed by reading specific cells and one range in the first workbook (it has 2 spreadsheets). Then I assigned values to the other variables that will be gathered later from the browser and a current date ToString.
Next I was able to write those variables into a mock spreadsheet, in the order needed.

First question is: Can I use the Assign Multiple function to create a “data table row” and then use Append Range to write that info into the next available blank row?


Second Question: If not, then how else can I write the 7 variables into one row dynamically?

The columns are fixed with named headers.
Please let me know how to do this as a google search turned up nothing specifically helpful.


Please use an add data roe activity

Then in array row you can give liek this

New Object() {var1,var2,….var7}

Then use append range to add to excel


I must be missing something. This is what I entered:

Add DataRow with ArrayRow Variables

When I debug it, I get this Error: Add Data Row: Object reference not set to an instance of an object.


That error comes when one of the variable you are using is empty…It might be any variable you used or the datatable itself…datatable can be initialized using New Datatable()

Check from the locals panel when run in debug mode to see which variable is empty


All the variables being input have values established. The only weird one is the GenericValue, I couldn’t get it to work as an Int32 type even though it is a 13 digits number. Does the type of variable matter when adding them in to the ArrayRow?

Empty Variables
The variable labeled as “RDOprocessed” is supposed to be the output data table from Add Data Row.


As mentioned above initialize that datatable youa re using in outvariable using new datatable

And also use build datatable activity and build the structure of the datatable like the columns and the datatypes

Genval.ToInt32 can be tried


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.