Excel file not copying

Hi,

We need to copy the file from shared location to local path. Excel looks fine and manually opening but while running via UiPath in production we are getting the error "Excel cannot open the file ‘abc.xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

In test machine, it’s working fine but in Prod machine it’s throwing above mentioned error.

Kindly help me on this.

Can you share the screen shot
Which activity u r using

Copy file activity in UiPath

Try using kill activity and kill excel instances before copy paste
And check the path is given properly with extension for new and current location
If possible share property setting screen shot how u r passing values @sandhiyakp15

@sandhiyakp15,

The error you are getting definitely not from Copy file activity.

Looks like you are trying to open the copied file immediately after copying it.

Give a delay between these two activities or you can use a retry scope to make sure file is copied completely before any other activity try to use it.

No, we are getting an exception in copy file activity only. we don’t have read/open file immediate to copy file.

Yes we kept that logic

@sandhiyakp15,

Even if it’s not immediately after the copy file activity, copy file file will not try to open or read the file.

Try separating the actual error causing activity.

You can add logic before and after the copy file and see if it’s failing or not.

If you search for the error over Google or in the forum you will see the error is related to opening the excel file.

Thanks. 1. manually we checked the file, no issues
2.I have created the separate sequence in test machine, it’s running fine and copy pasting the file from same shared location with same input file as in Production.
3. Even config excel file from the same shared path is getting copy pasted.
4. Only Input file alone getting exception that too only in Production machine.

Hi,

I have kept a log message between copy file and open file but while throwing the above exception, I didn’t see that log message. So it means, issue in copy file activity only right.

Try following

  1. Include kill process and keep excel with continue on error as True
  2. Try to create a copy of the file OR Create a new file in the same location and do copy activity. This is to segregate the issue. If new file is working fine - we can focus on the file which you want to fix
  3. Confirm the extension is .xlsx in the properties
  4. Also share the size of the file