Extract only excel file from zip

Hi Team,
Can anyone please suggest me how to save only excel file from zip.

1 Like

That’s a good question
So first we need to get the files unzipped and then we need to get the excel files alone from that extracted folder
—to extract a zipped folder we need to use INVOKE METHOD Activity with Target Type as System.IO.Compression
And in the Method mention as ExtractToDirectory
And in the property panel of this invoke method activity Along the property Parameter pass two properties with IN arguments like one is the zip folder path and another one is the folder path where we need to extract this file
For more info on this

—so once after extracting them use a assign activity like this
arr_filepath = Directory.GetFiles(“yourextractedfolderpath”,”*.xlsx”)
Where arr_filepath is a string array variable
Which will be having the file path of all excel files in that extracted zip folder
Then we can use that array variable inside a for each loop and use them one be one

Hope this would help you
Cheers @sanju_RPA


Hi @Palaniyappan

     I'm not able to select System.IO.Compression.ZipFile

and imported System.IO.Compression

1 Like

Hmm fine
We need to add an external assembly to do that
For more info with steps

Cheers @sanju_RPA

Hi @Palaniyappan,
how to zip a single excel or txt using Invoke method i have searched mostly they have given examples to Zip a folder if you have any suggestions or any links to look on kindly share it will be helpful

1 Like

Did we try with Balareva zip activities

Cheers @saravanan.c

yes i tried but client is not accepting custom packages so i have to go with invoke method.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.