Anyone who know how to append the csv records to a single Excel sheet dynamically instead of over-writing it.
I have a few csv files to be appended into one single xlsx file but I need to find out how to customize the cell range (from Write Cell activity) in a dynamic way.
—let’s say like we have set of csv files in a folder
And we need to append them to a excel file
—for that use a assign activity like this
arr_files = Directory.GetFiles(“yourfolderpath”,”*.csv”)
Where arr_files is a variable of type array of string
—now use a FOR EACH activity and pass the above array variable as input and change the type argument as string
—now use a READ CSV FILE activity and pass the variable item.ToString as input and get the output variable of type datatable named dt
—now use APPEND RANGE ACTIVITY inside the excel application scope where pass the above datatable variable as input
—next to this append range activity use a Clear datatable activity and mention the variable dt as input
Where dt is a variable of type datatable with default value as New System.Data.Datatable
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.