Create multiple excel file based on column values

Hi!

So I have a sample excel file below.

image

What I want is to create separate excel file for each animal type. In the sample, I have 4 animals so it should create 4 excel (1 for dogs, 1 for,1 for rabbits and 1 for horse) displaying also all columns.

Thanks!

2 Likes

@caduque

1.Read the excel and store it in dt1.
2.use assign activity,get the rows count,count=dti.Rows.count.toString
3.use Read Range and in range give as" A1:A"+count,store it in dt2.
4.use remove duplicate Rows activity and remove duplicate
5.use for each row
6.use write range activity and give row name,it will create excel with animal names.

Regards,
A Manohar

1 Like

Hi @Manohar1,

In your step 3, should I use the read range from Excel activity or the Read Range from Workbook?

I’m not getting the desired output :frowning:

Hi @Palaniyappan,

Can I have some of your spare time to ask how to solve my problem above?

1 Like

Hi @caduque please try this,

1.Read input excel by using read range activity
2.Use filter data table activity and set filter row like image below and set it to output datatable

image

3.Use write range activity to write your output datatable in 2. one by one

Hope it help !!!

Hi @caduque

I have created workflow based on your requirement please check below attached zip folder I hope you will get the solution.

CreateMultipleExcel.zip (26.6 KB)

Regards,
Kommi Jeevan.

2 Likes

@caduque

go through the below workflow

animlas.zip (34.6 KB)

Regards,
A Manohar

Hi @kommijeevan,

Your solution is good. But what if there was an animal suddenly added without me knowing? I’m thinking of a robust code for this part of the process. But thanks anyways. Appreciate it bro!