Hi, I have an excel sheet in which I have to add one row in second position with values,
How can i achieve this! Please Help
TestSS:-
output should be:
I don’t want to add 2nd row in start, After execution of whole process, at last I have to append this row at 2nd position and set value.
Please create a datarow variable & create a sequence ,inside that sequence
Datarow_var= ExistingDatatable.NewRow
Datarow_var(“Datatable Column name”)=“Value want not insert”
then use invoke code activity
create two arguments for datatable,datarow
inside the invoke code activity
In_datatable_var.Rows.InsertAt(In_datarow,0)
In the end of your work flow. use excel application scope inside use the below activity to insert blank row in the second position.
Insert / Delete rows acitivity → insert values in the parameters No Rows = 1,
Position = 2 , Change mode → Add
once you create empty row → Use bulid data table activity and insert the columns and your values you want insert in the second row the output of the build data table activity is datatable with the values you mentioned in the screenshot.
Use write range activity and assign the Data table whiich you got from build data table and enter Range “B1” and uncheck the add data headers.