FTP File Download: Excel File gets corrupted

Hi,

I am using FTP download activity to download excel files from FTP server, issue is that after being downloaded the files are getting corrupted, I am getting the below error message while I am trying to open the file manually, however the file still open after hitting OK button but is blank without any data in it.

Any guidance will be very helpful,

Thanks

@Palaniyappan @sarathi125 @loginerror Any suggestions on this please

Could you maybe try checking the file downloaded via Studio for corruption in Notepad vs normally downloaded one? Sometimes we could find out more about the issue this way.

Thanks for your reply, I am not sure but I think issue is with the version of FTP activities

Below is the one which I was trying and comes under 'Official packages’ version - v1.0.734628183,
Using this I was getting corrupted downloaded excel files( manually works fine)

However, when I check '‘Go’ I downloaded the below FTP activities, this one also says by UiPath but has different set of FTP activities under it, downloading works fine using this version, there are difference in both cases, for instance former has iterate files and gives output as datatable but latter has iterate objects which gives output as IEnumerable,I am confused which is the official one here but latter works for sure while downloading excel files in correct format.

1 Like

Hi @Faraz_Subhani

First, the answers:

  • all activities by UiPath are official
  • the one with the highest version is the most recent package (the one on the Marketplace feed).

The only difference with the FTP package is that it belongs to a small group of packages that were made open source, see here:

This does not mean we are not supporting them (we are), it simply means that anyone can help us maintain them. All commits will still be validated by UiPath, of course.

1 Like

Thanks for your confirmation, I was worried because the version working for me never appears in search under ‘All packages’ even after I check ‘Offiicial’, however When I check the check box '‘Go’ then the working version appears.

image

Case 1:
While searching under all packages( Official checked and ‘Go’ unchecked) - This is buggy one with download format issues.

image

Case 2
While searching under all packages( ‘Go’ checked) - This is the working one

image

Just wondering, the working one should have come if official is checked, correct me if I am wrong.

@loginerror @Palaniyappan @vitthal7620 @jvanmarion Hi, so now that the things work but again one issue has come, I am using with FTP session in the inIt block to open the FTP session and iterate through all the files, now my each file becomes one transaction item.

When I come to process block, I need to download those FTP files based on certain parameters, problem is that download FTP won’t work, as it has to be under an FTP session, is there way I can pass the FTP session from init to process block( I didn’t see any output for FTP session which can be carried over).

If I try to open FTP session again in process it will be a blunder as for each transaction item it will hit and open FTP which I don’t want.

Any suggestions please.

isn’t it possible to first download all files to a local share and work from there? Then you don’t have to download them one by one.

Hmmm… that will be the only way out, it will just not be the optimized way, I have a doubt, why is that in the latest version of FTP activities we don’t have any output as FTP session whereas it is present in the older versions(older versions are buggy which corrupts excel file while downloading)

I suppose a solution could also be to open a new session for each file download within the loop that is supposed to download all the files.

As far as the suggestion to output the scope of the FTP Session, it is a cool idea. However, FTP Package being the Open Source one, our expectation would be for the community to help us add additional features :slight_smile:

As such, anyone is welcomed to improve the activity package hosted here:

I will mark this topic as #pr-welcome so that our community can find it easier.

Hello @loginerror @Pablito

Please advise!

The FTP package is now open source and the latest version has the feature to deal with the file attributes such as FileCreatedDate, FileModifiedDate, FileFullName, etc but the files downloaded using this new package’s activity are corrupted and can not be used by the robot, can you please suggest a solution to this?

Tried manually downloading the same files using the FileZilla and they are working fine and can be accessed by the robot too.

Thanks in advance!

Any specific error that is thrown for the files that don’t work?
Is it any specific file type?

Thanks for the reply!

Two types of error:

Read Range: Unable to read beyond the end of the stream

Read Range: Unable to read file. File corrupted.

Before searching for FTP activities check ‘Go’ and then search the package, official one is buggy.
image

This should work

I’ve done that, have the latest version which is shown above.

Currently for me, It seems this lagest version from Go is buggy, it corrupts the file if we download it.

Please advise if there’s any solution to this @loginerror @Faraz_Subhani

Try using the below version once
image

1 Like

Thank you, @Faraz_Subhani

Currently, that seems to be working fine now, Thanks for this suggestion.

May be the latest version of this activity has some bug.

1 Like

To fix the Excel file format extension error, you can try the Open and Repair inbuilt option.
This Microsoft document can be helpful to repair the file. Repair a corrupted workbook