Copy Data from one excel with Specific filter and pasting to another sheet of same excel

I searched forum but i didnt get appropriate answer.

I am working on a Excel that has 4 column and 100 of rows in it.

I have to Divide Excel into Multiple Sheets on the basis of filter.

Have a look at the attachments.BlankProcess1.zip (54.6 KB)

Hi @ChitraPal

Can you tell me criteria on what basis you wants to filter data?

Regards,
Naitik

On the Basis of Department

@ChitraPal Find the attached zip below. Inside “New” folder u will get the workflow.

BlankProcess1.zip (57.3 KB)

@ChitraPal

If you have fix number of departments, you can

  1. Read full data in single DataTable
  2. No of Criteria, That many times filter data table
  3. Open Excel in excel scope
  4. keep adding sheet and write range.
  5. Close all done

Another approach

  1. Read all data
  2. Create list of data table
  3. Based on criteria fill all Datatables
  4. loop data table list inside excel application scope, add new sheet and write data.

Hope this will help :slight_smile:

Regards,
Naitik

1 Like

Hi @ChitraPal,

Can you take a look. This will help you.

Regards
Balamurugan.S

2 Likes

Thanks alot. this was very helpful. :slight_smile:

2 Likes

Hi @balupad14,

Actually, Add sheet Activity is not able to create another sheet into the same excel in which we are working.
This activity is able to add sheet into another excel, though.

Regards,
Harshit Goyal

Hi @harsh497,

Thank you for your feedback. I explained about the Add sheet activity in the video. The purpose of the activity is that to add sheet in same excel file. For your kind ref : I have attached the video for you with the sample.
Sample:
AddSheet.zip (7.5 KB)

Video :

Regards
BalaReva

1 Like

Hi @balupad14,

Sorry, I might have not been able to explain well may be but I meant that If I am already reading and working with an excel file through read range in Excel Application scope and then within that excel only, I am not able to add another sheet using Add Sheet activity.

Regards,
Harshit Goyal

Hi @naitik.s, do you mind if you share the workflow? I tried this but the data that copied is not completed… There are some data that not copied into new excel file. Need your help with this. Thanks…

Hi @annisa.silvy

Please find attached solution, I have tested with some data, Let me know if you need any further help.

SolutionDt.zip (26.5 KB)

Regards,
Naitik

Hi @naitik.s

I’ve tried your xaml, but it seems not worked for me.
How if i want to split each department into new excel file? so, there will be some new excel files which have name according to the department (IT, HR, etc)… I tried my own code, but some data can not be added into the new excel file. Can you help me again? Thanks…

Regards,
Annisa

Hi @annisa.silvy

Can you share me sample data.

Regards,
Naitik

I tried the same without filter datatable activity. may be it help you.
Any suggestion is always welcome:)Practice.zip (20.3 KB)