Intermittent errors with Excel Export?

Hi everyone. I have a very strange problem that no one on my team can figure out.

I am exporting a file to excel from a form. We open the file, manipulate it a little, click file → save as → type in the file path from a variable (or collection of variables) - this file path changes each time, as we’re auto-incrementing the folder so the first time is GroupX and then GroupX(1)/GroupX(2) etc. → type in the file name → click save.

We have tested this about 40 times in the last two days. About 25-30 of those times it has worked perfectly. The remaining efforts alternate between 1) saving the file as a 0KB file that “cannot be opened because the file format or extension is not valid” or 2) not saving at all. In this instance we can watch the bot do each step - including clicking “save” - but the file just…isn’t there. No errors are thrown, and we continue on to a breakpoint beyond the save step, but the file just doesn’t save.

We are absolutely clueless about what’s going on. It may not be a UiPath problem at all, frankly. It may be Excel or it may be something about our virtual desktop setup, but my project-partner and I have the same problems from separate computers/locations.

To simplify, we ran it three consecutive times this afternoon, closing all the related programs between/before runs. On the first run we had a 0KB file which was unable to open, on the second run everything went perfectly, and on the third run the file didn’t save at all.

If anyone out there has even the faintest guesses, I would be grateful to hear them. Also I’m about 2-months old as a UiPath user, so hopefully any possible solution is something I understand, haha.

Thank you,

Type Into can be unreliable when typing into the Save As box. Try Set Text instead of Type Into.

@Nye_Kevin are you using modern activities?

in your type into activity set
verify execution = verifyExecutionTypeIntoOptions

then set retry = true
and timeout = 2/3 seconds

this will make it so that UiPath verifys that a.txt is typed, if it isnt typed correctly after 2 seconds, it will retry the action. This will repeat until 30 seconds is up

you can change the total timeout here (default is 30 seconds)

Thank you for the reply and suggestion. Unfortunately, on my first try I ended up with a 0kb excel file. This suggestion may help with the issue when it occasionally didn’t save at all though, so I’ll keep these options locked in and see what happens going forward.


Thanks for this input. However, it has not solved the issues that I’m currently having. I think it may be an excel problem and not a UiPath problem, so I’m browsing excel forums now.