i.m struck somewhere in manipulation of Excel sheets. Please help.
My scenario is :
i have 2 excel sheets and in both sheets there are some common data eg employee id , name, age and 2 different column with named gender and DOB. Now i have to create a directory respect to year that i had done and in this directory create 2 excel according to gender and put the data accordingly as per both sheets
Welcome to UiPath Community!.
Read first excel and filter with the first Gender, Then write it into a new excel in that path.
Filter the same data table again with second gender then write it into a new excel in that path.
Then read the second excel and use data table filter then using append range update the data into the particular gender excel. Same way do for the other one.
Welcome to uipath community
–hope these steps would help you resolve this
–use a EXCEL APPLICATION SCOPE and pass the file path of first excel and inside the loop use READ RANGE activity and get the output with a variable of type datatable named dt1
–now again use same EXCEL APPLICATION SCOPE and READ RANGE for second excel and get the output with a variable of type datatable named dt2
–now use a ASSIGN activity like this
dt_male = dt1.Select("[gender] = ‘Male’ or [gender] = ‘M’ ").CopyToDatatable()
and another assign activity like this
dt_female = dt1.Select("[gender] = ‘Female’ or [gender] = ‘F’ ").CopyToDatatable()
where dt_male and dt_female is a variable of type datatable defined in the variable wit default value as new system.data.datatable
now we can use WRITE RANGE ACTIVITY with those two datatables passed as input and mention the file pat of excel in EXCEL APPLICATION SCOPE
let me try it.
that’s i am able to do but the along with i’m inside the loop of year as i have to create a directory also for each DOB and then i have to pass these these data inside that then data table is not accessible it will overwrite the data