im getting this error
This happens because your data table ABC is not of type DataTable. Change it’s type in the variables panel into System.Data.DataTable
i did that but then its given me error in above activity that System.Data.DataTable to System.Generic.IEnumberal
Why are you using Read Column activity and not Read Range?
so you want to a add that data column to a excel with write range
if so
use READ RANGE ACTIVITY and get the output of the first excel file with a variable of type datatable named dt1
–then use a assign activity like this
dt1 = dt.DefaultView.ToTable(False,“columnname”)
–now we can write that datatable to that the excel with write range
Cheers @Mayur_Pawar
i got expected output but i want to again append another data in that excel only
kindly elaborate that pls
Cheers @Mayur_Pawar
so from excel 1 i got data and i used write range for writing data now i want to again write another data (numeric values ) in that second excel on which i had inserted first data only
ilike this i want to do
every time ill get new excel but one common column that i want to write in another excel which is fixed
Fine
we can use ADD DATA COLUMN activity so that it will get added everytime at last
Cheers @Mayur_Pawar
OK but I’m confused what to write in “column”, “column name”, “Data Table” and “Type Argument” ?
Hi
if we have any datacolumn type variable then we can mention that in column property else mention a new column with name alone in column name property and mention the datatable to which we want to add that column and the type argument is the datatype of that column
for more details
Cheers @Mayur_Pawar
should i put in for each loop ?
are we more data column one by one
if so we can use loop
Cheers @Mayur_Pawar
then fine @Mayur_Pawar
kindly let know for any queries or clarification
just one last help
can you please tell me the entire follow again like activity sequence and which activities should i use
you know the process what i want to say so the exact which activity and the flow of activities
based on this
the sequence would be like
–use a EXCEL APPLICATION SCOPE and pass the file path of excel as input
–inside the scope use a READ RANGE activity and get the output with a variable of type datatable named dt1
–now use ADD DATA COLUMN activity
where in the column property mention the datacolumn variable we have obtained
and in the datatable mention as dt1
and in type argument mention as string
and to get that datacolumn variable from any excel or datatable
first we need to have a datatable extracted from another excel, named dt2…now with normal assign activity
dt_column = dt2.Columns(“columnname”)
or
dt_column = dt2.Columns(columnindex)
where dt_column variable is of type datacolumn which can be passed as input to the add data column activity to the property columns
–after this we can use WRITE RANGE Activty and pass the variable dt1 as input and mention the file path of second excel file
Cheers @Mayur_Pawar
we have to use for loop as well na ? if yes then where and how ?