Excel PDF

Hi guys, I want to write filtered data from first excel file to second excel file, I am able to filter the data from first excel file and I am able to write the filtered data into second excel file, but my question is once I am writing to second excel file(The data which is already in second excel file is not erasing it, and it is rewriting with the filtered one)
-> I want to rewrite the complete excel file with filtered data which is extracting from the first file. Can anyone suggest me how to solve this?

Thanks in advance!!!

1 Like

Are saying that the excel which you are writing to already has some data in it?

Hi @NikhilRPA,

Inside an Excel Application Scope, use write range and in the DataTable field, insert the datatable from your Filter Data Table activity in the Output section

@vishal.kp Yup, There is already data present. I want to rewrite the whole file with filtered data

Then just delete the excel before writing to the excel. There is a delete activity which is specified by the path.

Hey @caduque this is already done I can able to write into second excel file. But there is already a bunch of data in the second file. I don’t want that

The you just need to delete the whole file before using write range so it would create another excel file with the same filename.

1 Like

@vishal.kp is that “delete range” activity ?

NO, it is delete activity, which takes input as path.

1 Like

@vishal.kp Hey Thanks this helps me and it is working as I expected

1 Like

Hi @NikhilRPA

First delete filter data sheet. Use this package Balareva.Excel.Activities and use delete sheet
activity find this package in Manage package.
I have create workflow based on your requirement please run and check before run this
workflow please change the path where you save excel file path and then run I hope you will
get solution.

FilterData.zip (25.3 KB)

Kommi Jeevan.

1 Like

cheers, happy learning :slight_smile:

Hey Thanks @kommijeevan I got the solution by using delete activity before writing into the excel file

@NikhilRPA by using delete activity you can delete entire excel file not sheet. If you want to delete sheet alone use delete sheet activity.

@kommijeevan I cannot find “delete sheet” Activity? Can you type exactly

First install this package (Balareva.Excel.Activities) in manage package and then you will get delete sheet activity.


Thank you very much @kommijeevan

1 Like

Good to hear @NikhilRPA. If you find it useful mark it as solution and close the thread.

1 Like

@kommijeevan Hey, I have activated the packages and I can able to see the Delete sheet activity and It is better to delete the sheet instead of deleting the whole file with out loosing the data from another sheets… This helps me

Thanks :slight_smile:

I want to filter the data which I am looking only for the column State=CA and Entity= Raise. The below syntax I am using for filtering Can you check where I am getting wrong?

DtSave.Select(“STATE=CA” And “ENTITY=RAISE”)