How can I leave an excel spreadsheet open when UIPath automation opened it

It seems that if it was open already then uiPath will leave it open but if it’s closed then uiPath will open it, do it’s thing then close it again. I’d like to run an automation that leaves the file open for me to work see in the morning without having to remember to open it first?

I think a quick solution would be to add a Delay activity for the application to be remained open for sometime, like until next morning from the time it is run for you to see as a first thing and then you close it. Maybe wrong too. will still find if there is any other options.

1 Like

Hey @billpennock

You can Open that Excel file in the initial step by using “Start Process” Or “Open application” Activity. So it will remain open till you will close it or by using close application activity or something else :slight_smile:

Let me know if still have doubts on this.


1 Like

Well, no wonder I’m in the Rookie section :smile:. Just to be sure though I would open excel, probably with the spreadsheet open that I wanted then add the excel scope to put all the actions in yes?

Well I thought that would be easy. Turns out not so much. Here is what i’ve tried

  1. Open Application - requires a selector and I can’t find documentation other than “usually an xml snippet”. That doesn’t help me without examples of what xml format it might be looking for
  2. Open Process = this works except if I don’t open excel with the file name I am going to open in the scope then the scope closes the file leaving excel open but not the file
  3. my document has a space in the name so I haven’t figured out how to pass a quoted string as the argument to …\excel.exe. (see below)
    May I suggest that in future iterations you don’t automatically close a document that’s opened with the application scope but you let the user decide if that’s what they want to do? This would help in automation assisting the user situations but allowing for easy programming to unassisted as well, letting the user chose explicitly. Just a thought?

PS I am using parallels on a mac which is why you see “\Mac” as the first folder. The error I get using the picture above is from excel "can’t find “\Mac\Home\Documents\Investment.xlsx” Hence why I say it’s the unquoted string that is getting sent to excel


What is it that you want to achieve, like to open certain file name(like working on a daily workbook) I’m wondering why you need to leave it open, if it’s on your machine, well that’s ok but if it’s on at work it might be risky, anyway, can you share your Xaml file so far?

PS I guess the address it’s incomplete.

The process is to open several investment sites and get the total value of each account and put it in cells in a spreadsheet. I do this myself manually each morning and I would far rather spend my time analyzing than doing this busy work. It’s also a way for me to learn real world scenarios for uiPath. If this was anything but personal and in my own home I would ,of course, not want to leave the file open. Interestingly if the file is open already then it works just fine without closing it. DailyInvestmentUpdate.xaml (19.2 KB)

1 Like

Hi Bill,

Cool, I’ll take a look and will reply.

regards. :slight_smile:

thanks. While your at it and if you don’t mind you’ll see i have a variable for todays date assigned at the end of this. My spreadsheet, at that point in time, is on the cell currentcell() I want to enter that date into. I can’t figure out how to get uiPath to enter that date in the current cell when I don’t know in advance what the cell reference will be. In fact it will change every time this is run.

1 Like

:smile: I’ll take a look as well. What I like is that you are able to identify what is that you want achieve. :sunglasses: keep it up.

It works for me this way, one change i made is i removed “.xlsx” extension from file name in folder

strpath = chr(34)+"\Mac\Home\Documents\Investment Daily"+chr(34)


that worked!!! Thanks.

1 Like

Regarding this, do you need to know the Cell or can you paste the Date at a specific step without knowing the Cell?

If at a specific step, Use “Set to Clipboard” with Input as now.Tostring() and send Hot key “ctrl + v”

1 Like

I had not thought of that. I think too much like programming sometimes and miss the automation of how a human would do it. Being new to this my programmers gut says it would be error prone. In this case it’s me using the spreadsheet so I’d know better but if I was doing this for a “regular user”, whatever that really is, I would want to put some kind of checks that they haven’t done something to the spreadsheet like add a column in a place that would make my cut/paste go wrong. I could test for a date before entering another date. Would making more use of range names make it more robust? for now I have the spreadsheet copying about 15 cells down one to make room for my new daily information and I use a “footer” range name which I reset with uiPath each time. I could set the cells of data I need to update to have range names as well. Would that be more robust?

1 Like

Well that seemed easy enough but when I tried it the step “send hot key” threw and error that it needed a target. So I’m back to what is the current cell because that’s my target.

Can you send the screenshot of where and how you are executing the send hot key? target is not really needed

Sure. If these two activities were not there then the spreadsheet would be open with the active cell as the cell I want to paste the current date into. I did a messagebox earlier to prove that CurrentDate does in fact hold the string type value “5/10/2017” (as I write this)

Can you try sending F2 before the control V hot key?

1 Like

I tried F2 but it left me in the cell. That gave me the idea to try selecting the editing area and then double clicking to make sure the date that was already in there was fully selected so that when my new date went in it would overwrite it. Then I tried the ctrl-v again and got the following

I went to the spreadsheet and typed 5/11/2017 enter and it went in fine so the spreadsheet was ready to accept it but this darn “target” requirement is getting in the way instead of just accepting that it should paste

can you share your xaml along with the spreadhsheeT?