How to Zip Multiple Excel Files

Hi,

with the help of Blalreva.zip activity i can zip an excel, but i have to zip multiple excel ( each single excel file should zip with the excel file name ).

please help me

1 Like

First get all file names from the folder, pass that each file name inside a for each loop and convert each excel file into zip file inside the for eah loop…

2 Likes

@srinivasanma
1.use for each…to iterate excel files.
Directory.GetFiles(FolderPath,“*.xlsx”)

2.Inside for each, you can use zip file activity.

2 Likes

Hi Srinivas , Welcome to the Forum

please use for each loop
FOR EACH of Directlry.getfiles(folderpath",“*.Xlsx”)

The argument should be string

Now place the zip file activity inside the body of the for each loop

2 Likes

Hi @srinivasanma,

Welcome to UiPath Forum community.

Here I have attached the sample for you.

srinivasanma.zip (17.7 KB)

Here is the screen shot.

Regards
Balamurugan.S

1 Like

Hi Community,
in the same way if I would like to unzip easily zip or 7z file does uipath has an activity to do that ?
Thanks a lot for your answer

Regards

1 Like

Thanks for the solution bro, i needed like i have more files in a folder and i have to zip each single file i mean each single excel file into each single zip file. I have attached the screenshot for your reference.

Thanks for the solution bro, i needed like i have more files in a folder and i have to zip each single file i mean each single excel file into each single zip file. I have attached the screenshot for your reference.

@srinivasanma

Try this solution.
Main.xaml (7.9 KB)

Hi @srinivasanma

Screenshot…
Design:

Output

Here I have attached the sample …

srinivasanma.zip (39.5 KB)

Regards
Balamurugan.S

1 Like

Thanks bro… its working fine.

1 Like

thanks for the response and solution

2 Likes

Welcome @srinivasanma …

This is great! How would I modify the Zip activity to zip multiple folders in the file path and keep the zip file the same as the folder? With the folder these is no extension to replace.

File Path:
Folder1
Folder2
Folder1.zip
Folder2.zip