- Use Read Column with H2 as input in Standard Template
- Use Read Column with A1 as input in Download Template.
Use .Count to find out how many data in Download Template
- Use For Each, to Write Cell in Download Template
Start column is based on step Number 2 (.Count)
Hope these steps would help you resolve this
—use Excel application scope and pass the file path of standard xlsx and inside the scope we can directly use READ CELL activity and mention the cell as “H2” and get the output with variable of type string named str_input
—now use another Excel application scope and pass the file path of another excel file
—inside that scope use READ RANGE activity and get the output with variable of type datatable named dt
—followed by this use a WRITE CELL activity and mention the input as str_input and in the cell mention as ”A”+(dt.Rows.Count+1).ToStting
This will write the value at last to the excel
Hi in write cell activity we have to mention cell position as this
As you have mentioned this value part it’s not working
Moreover in value property we need to mention the variable obtained from previous Read Cell activity
Thank you very much.
I have data in column(not specified) , that needs to be copied to next column of same sheet in same excel . and edit the header name. (Eg week1,week2,week 3 … )
Could i get some help regarding this ?
Yah we can use ADD DATA COLUMN activity and add a new column to that datatable
–then use a FOR EACH ROW activity and pass the datatable as input and inside the loop use a assign activity like this
row(“new columnname”) = row(“yourcolumnname”).ToString
New Microsoft Excel Worksheet.xlsx (10.7 KB)
in this excel i am trying to insert column after column name"2019". and copy column"2019 " and paste it into next column. and edit 2019 to 2020.
check attached file.
Yah that’s possible first we need to add the datacolumn at the position we need if it’s not there
And then we can use for each row loop and insert the data with a assign activity as mentioned above
can you share steps by step flow??
The steps involved will be as follows
—use excel application scope and pass the file path of excel as input and inside the scope use read range activity and get the output with variable of type datatable named dt
—now use a assign activity like this
int_index = dt.Columns.IndexOf(“2019_columnname”)
Where int_index is a variable of type int32
—now use a Invoke Method activity and mention
the property like this
- TargetType - (null)
- TargetObject - dataTableName.Columns(“YourColumnName”)
- MethodName - SetOrdinal
Then in the Parameter Properties tab of the activity, mention as
- Direction - In
- Type - Int32
- Value - int_index
Now this will add a new column next to the column 2019 in our datatable
—next use a FOR EACH ROW activity and pass the datatable dt as input and inside the loop use a assign activity like this
row(“yourNewcolumnname”) = row(“yourcolumnname”).ToString
This will copy all the value to the new column which can be written to excel with Write range activity
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.