I have an excel file that includes data of employees i want to print all employee details in different excel files

studio

#1

As of now i am using the excel app scope and filter data table that make the workflow a bit long.
data that i have in excel is like mail id , salary , department, age etc.
total number of depart around 12 departments
i am adding the workflow for admin as an example :

from the output data table in using excel scope to create a new excel file and then print the same filtered data in it

i wanted to know is there any other way that i can do the same thing and i dont have to create that much long workflow.

please help


#2

Hi @manoj2500,

After filtering the data use write range activity in under workbook. So that it will create the new excel file also.

Regards,
Arivu :slight_smile:


#3


this is the other half part for a department like admin

i wanted to know is there anything else we can do because if i have 10 different departments i have use the same workflow again and again 10 times


#4

Hi Manoj,

You can easily do it in a single workflow with just 4 activities.
1.create a string array with the all the department names.
2.Use Read Range activity to get the excel sheet to a datatable. Let it be DT1.
3.Inside a for each activity, loop through all the elements in the string array.
4.Assign a new datatable, DT2= DT1.Select("Department = '"+item.ToString+"'").CopyToDataTable . This will filter all the rows according to the element in the department array.
5. Use a write range activity to write the filtered datatable .

I created a demo workflow . Please have a look at it. Department_filter.xaml (7.1 KB)
emp-details.xlsx (10.3 KB)

Warm regards,
Nimin


#5

thanks for the help .
one more thing as i have 15 department name as i declared a variable and as i have mentioned all of them under that variable its showing a error message as

compiler error encountered processing expression end of expression expected


#6

Hi Manoj,

Please store the department names in an array, like {“HR”,“IT”,“Accounts”,“Service”}.
You are getting that error because you may missed some character that meets the syntax of the statement. Please check it and if the issue still persists, kindly share the workflow or details of the activity that occurring the error.

Regards,
Nimin